Bob Ippolito avatar Bob Ippolito committed 106e7d3

patch for rest server compatibility

Comments (0)

Files changed (2)

+Version 1.2.5:
+* Fix for decoding chunked HTTP responses with extraneous whitespace
+    * includes extra whitespace in its chunked HTTP response
+      length, e.g. "6  \r\n" instead of "6\r\n".
 Version 1.2.4:
 * Fix handling of HTTP response code 304 (patch by Ben Slavin)


 chunk_size(<<"\r\n", _/binary>>, Chars) ->
+chunk_size(<<$\s, Binary/binary>>, Chars) ->
+    %% Facebook's HTTP server returns a chunk size like "6  \r\n"
+    chunk_size(Binary, Chars);
 chunk_size(<<Char, Binary/binary>>, Chars) ->
     chunk_size(Binary, [Char | Chars]).
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.