Skip Menu |

This queue is for tickets about the XML-Atom CPAN distribution.

Report information
The Basics
Id: 42201
Status: resolved
Priority: 0/
Queue: XML-Atom

People
Owner: Nobody in particular
Requestors: me [...] dbourget.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.32
Fixed in: (no value)



Subject: google books api says "401: unknown authorization header"
The headers added around lines 177-178 in XML/Atom/Client.pm cause Google Books API Atom requests to fail with a "401: Unknown authorization header" error. For your convenience, here is a feed url that should work for testing: http://books.google.com/books/feeds/volumes?q=author%3AChalmers%20title%3AThe%20Conscious%20Mind&min-viewability=partial&max-results=1 Google's API is public and does not require authorization. A simple fix is to make the headers conditional on a username having been provided (which would seem desirable anyway), e.g. : if ($client->username) { $req->header('X-WSSE', sprintf qq(UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"), $client->username || '', $digest, $nonce_enc, $now); $req->header('Authorization', 'WSSE profile="UsernameToken"'); } db
Fixed in 0.33