Skip to content
This repository has been archived by the owner on Apr 7, 2021. It is now read-only.

Commit

Permalink
follow 302s, too
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Jan 14, 2012
1 parent 410eee1 commit 11b1428
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.coffee
Expand Up @@ -92,10 +92,10 @@ process_url = (url, transferred_headers, resp, remaining_redirects) ->
resp.writeHead srcResp.statusCode, newHeaders
srcResp.on 'data', (chunk) ->
resp.write chunk
when 301
when 301, 302
if remaining_redirects <= 0
four_oh_four(resp, "Exceeded max depth")
is_finished = false;
is_finished = false
url = Url.parse srcResp.headers['location']
process_url url, transferred_headers, resp, remaining_redirects - 1
when 304
Expand Down

0 comments on commit 11b1428

Please sign in to comment.