Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Parse redirection correctly and accept HTTP 1.0 response #5

angerman opened this Issue May 21, 2009 · 1 comment


None yet
2 participants

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.)

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


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

micha commented May 21, 2009

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