Permalink
Browse files

normalized yql response which introduced a *result* into headers, tha…

…nks @souders for the catch
  • Loading branch information...
1 parent d74ed20 commit 1ddc98a819ea2937adab5ff0b6a79f2fa589bc54 @marcelduran committed Mar 3, 2013
Showing with 10 additions and 0 deletions.
  1. +4 −0 CHANGELOG
  2. +6 −0 src/bookmarklet/controller.js
View
@@ -1,3 +1,7 @@
+Version 3.1.6
+-------------
+* Fixed bookmarklet yql response *result* on headers. Thanks @souders
+
Version 3.1.5
-------------
* Added onerror handler to PhantomJS
@@ -225,6 +225,9 @@ YUI().use(function (iY) {
arrayEach(redir, function (red) {
var headers = {};
+ // normalize headers, yql introduced result in response
+ red.headers = red.headers.result || red.headers;
+
objEach(red.headers, function (value, key) {
headers[key.toLowerCase()] = value;
});
@@ -242,6 +245,9 @@ YUI().use(function (iY) {
}
comp.href = comp.url = v.url;
+ // normalize headers, yql introduced result in response
+ v.headers = v.headers.result || v.headers;
+
// build raw headers
objEach(v.headers, function (v, k) {
rawHeaders += k + ': ' + v + '\n';

0 comments on commit 1ddc98a

Please sign in to comment.