Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing http request handling #19

Closed
wants to merge 1 commit into from

Conversation

lalyos
Copy link
Contributor

@lalyos lalyos commented Apr 27, 2015

Before this fix all Header handling was adding to the header values, not setting them:

Here is a sample of the traced headers, for calling browser a couple of times

[HACK] before login
===== [DUMP] =====
 GET /account/login/ HTTP/1.1
Host: hub.docker.com
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)


[HACK] submit login ...
===== [DUMP] =====
 POST /account/login/ HTTP/1.1
Host: hub.docker.com
Referer: https://hub.docker.com/account/login/
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)


[HACK] login success
  - csrftoken [] T5CW6NekaS40J9AiARgS8ma7m9lZFBiQ
  - docker_sso_username [] sequenceiq
  - sessionid [] bpvtto7wf0vpg3fdwyzsvxk4tujqj533
===== [DUMP] =====
 GET /u/sequenceiq/alpine-dig/ HTTP/1.1
Host: registry.hub.docker.com
Content-Type: application/x-www-form-urlencoded
Cookie: csrftoken=STwCpsKaEwT9mqfZ5ZTJSmDPf3ZixK5M
Referer: https://hub.docker.com/account/login/
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)
User-Agent: Surf/1.0 (Darwin 14.3.0; go1.4.2)

@progrium
Copy link

+1 super important fix for our basic use for surf

@headzoo
Copy link
Owner

headzoo commented Apr 28, 2015

Thanks. I'll merge this into the dev branch today, run it through the tests, and merge into master if everything works.

headzoo added a commit that referenced this pull request Apr 28, 2015
@headzoo
Copy link
Owner

headzoo commented Apr 28, 2015

I merged this pull request into the dev branch, which I'll most likely merge into master later on today.

@headzoo headzoo closed this Apr 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants