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

Add support for multi-line header values #123

Closed
valyala opened this issue Jun 27, 2016 · 4 comments
Closed

Add support for multi-line header values #123

valyala opened this issue Jun 27, 2016 · 4 comments

Comments

@valyala
Copy link
Owner

valyala commented Jun 27, 2016

Currently fasthttp doesn't support multi-line header values. See https://github.com/kataras/iris/issues/190 for details.

Probably, multi-line header values must be supported or properly handled by fasthttp.

@illotum
Copy link

illotum commented Sep 1, 2018

This requires some design decisions.

Current header parser stores subslices to original headers, thus we can't follow http example and merge multi-line headers into one of the value1; value2 kind. We could return all lines with the matching key, but that means a change in Peek signature (to [][]byte).

@erikdubbelboer
Copy link
Collaborator

I don't think we should change the Peek signature. What we can do is add another method called PeekMulti(key string) [][]byte. One issue is that it will always result in a heap allocation for the [][]byte. We could avoid that by making it PeekMulti(key string, reuse [][]byte) [][]byte where reuse gets reused for the return value.

@kirillDanshin
Copy link
Collaborator

Of course, we will not change existing API. +1 on *Multi, if we'll find anyone that still needs that feature 😀

tedli pushed a commit to tedli/fasthttp that referenced this issue Nov 4, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Nov 7, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Nov 7, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Nov 15, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Nov 26, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Dec 9, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Dec 13, 2019
tedli pushed a commit to tedli/fasthttp that referenced this issue Dec 13, 2019
@Fenny
Copy link
Contributor

Fenny commented Aug 16, 2020

I think this issue can be closed #688

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

No branches or pull requests

5 participants