Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Parse redirection correctly and accept HTTP 1.0 response #5

Closed
angerman opened this Issue · 1 comment

2 participants

@angerman

Here is a very quick fix to make resty accept HTTP 1.0 responses too and make it deal correctly with redirections. (always take the last response code.)
Turn

    |sed '/^.*HTTP\/1\.1 [0-9][0-9][0-9]/s/.*\([0-9]\)[0-9][0-9].*/\1/p; d')

into

    |sed '/^.*HTTP\/1\.[01] [0-9][0-9][0-9]/s/.*\([0-9]\)[0-9][0-9].*/\1/p; d' | tail -n1)
@micha
Owner

Awesome, thanks! Much better now. Patch applied.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.