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

setHeader dangerous #6

Open
istathar opened this issue Dec 17, 2013 · 2 comments
Open

setHeader dangerous #6

istathar opened this issue Dec 17, 2013 · 2 comments
Assignees
Labels

Comments

@istathar
Copy link
Member

Well. I suppose I should have known better, but @bitonic is right: if you call setHeader you can change a header value without influencing the internal state carried around in the Request object being built.

The obvious fix for this is to have everything expressed in terms of setHeader and to have a giant case statement in there which parses field names and does something strongly typed if it's one of the special cases.

I would have preferred not to dot his, because it is a performance sensitive area of the code, and the way it works now is fast, thank you very much. I'll have to (re)write some benchmarks to make sure we stay cool.

AfC

@ghost ghost assigned istathar Dec 17, 2013
@bitonic
Copy link

bitonic commented Dec 17, 2013

Again, I think the most sensible thing to do is to let the user set things more freely, but then ensure that the right headers are set by overriding the right ones when rendering them. I already have implemented something like that in a private branch (private because I'm working on it at work and I'm not sure how to release it), I'll probably put it up in the next few days.

@istathar
Copy link
Member Author

@bitonic

We really should schedule a time to chat. GitHub is not really the place for design discussions. Can you ping me on IRC again, and we can arrange a time? You're obviously very enthusiastic about this, but as it stands you're charging ahead determined to do things your way — which is fine, except that it means it'll be hard for me to merge. I'd prefer to have you on-side as a collaborator. If we can schedule some time to have a nice long chat about what you're trying to achieve, I can do the same, and we can try and meet in the middle somewhere.

AfC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants