You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everyone,
it's kinda odd to ask a RFC question in a rawHTTP lib :D but maybe other devs might run in the same pitfall.
I'm currently migrating some tools to your version of rawhttp and during testing i noticed a different behaviour in regards to header handling.
Headers will be created without space after the colon:
Reason for this is the
WriteHeader
, which is used when performing theDoRaw
function (https://pkg.go.dev/github.com/projectdiscovery/rawhttp#Client.DoRaw.Code
rawhttp/client/writer.go
Line 71 in 84c18ae
rawhttp/util.go
Line 154 in 391d034
I know that linear white spaces are not required by the RFC (https://datatracker.ietf.org/doc/html/rfc2616#section-4.2), but a single Space is typically used by all sort of http clients e.g. golang (https://cs.opensource.google/go/go/+/refs/tags/go1.18:src/net/http/header.go;l=207).
Discussion
I would suggest a (breaking ?!) change for the
WriteHeader
to add a space after the colon, because of the following reasons:rawhttp/client.go
Line 122 in 391d034
Let me know what you think and thanks again for the work :)
Best regards,
c-f
Beta Was this translation helpful? Give feedback.
All reactions