-
-
Notifications
You must be signed in to change notification settings - Fork 941
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
Provide a way to override HTTP parser #855
Comments
Looks like I have already had similar issue in the past. It seems that Got could at the very least allow to override the parser that it will use to make requests. |
Annoyingly, it looks like the issue is intermittent. However, I was able to capture Got response when it was happening (using {
'cache-control': 'private',
'content-type': 'text/html; charset=utf-8',
server: '',
'set-cookie': [
'ASP.NET_SessionId=s44eyjpra41kfbzf2thltx3w; domain=.cinesa.es; path=/; HttpOnly',
'ReceiveComunications=; domain=.cinesa.es; path=/',
'visid_incap_626733=Hz5ALXzaRU2XVWfrrQUnv4Q+TF0AAAAAQUIPAAAAAABJs5Fln5jLbHGPPxpgbfUk; expires=Fri, 07 Aug 2020 08:40:57 GMT; path=/; Domain=.cinesa.es',
'nlbi_626733=jiFkFti8tFSxW7tfrg7CCgAAAADaVlWeOHrNRlTVZ1XRbc9Y; path=/; Domain=.cinesa.es',
'incap_ses_505_626733=cYXeHS6e205z8wbcXiACB4Q+TF0AAAAAq9/6MKcPgKjM2iROYAtIxQ==; path=/; Domain=.cinesa.es',
'___utmvmtRuEBFs=SefeVlEgWJF; path=/; Max-Age=900',
'___utmvatRuEBFs=aIm\u0001dPfD; path=/; Max-Age=900',
+ '___utmvbtRuEBFs=tZu XmsOvalH: Ity; path=/; Max-Age=900'
],
'x-aspnet-version': '4.0.30319',
'x-content-type-options': 'nosniff',
'x-frame-options': 'SAMEORIGIN',
'x-xss-protection': '1; mode=block',
date: 'Thu, 08 Aug 2019 15:23:47 GMT',
connection: 'close',
'x-iinfo': '2-4598390-4598419 NNNN CT(34 35 0) RT(1565277826197 663) q(0 0 1 -1) r(12 12) U12',
'x-cdn': 'Incapsula',
'content-encoding': 'gzip',
'transfer-encoding': 'chunked'
}
Note the highlighted header. It is invalid. And that is what is causing the issue. |
This is what cURL output looks like: HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 85151
Content-Type: text/html; charset=utf-8
Server:
Set-Cookie: ASP.NET_SessionId=j3ot1vtvpdjd4azav4kx4jy4; domain=.cinesa.es; path=/; HttpOnly
X-AspNet-Version: 4.0.30319
Set-Cookie: ReceiveComunications=; domain=.cinesa.es; path=/
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
Date: Thu, 08 Aug 2019 15:29:44 GMT
Set-Cookie: visid_incap_626733=VgZX+172S9m+3qs6LZb+6uo/TF0AAAAAQUIPAAAAAADhyReZXzYt0z5Nl0lFaHpQ; expires=Fri, 07 Aug 2020 08:40:55 GMT; path=/; Domain=.cinesa.es
Set-Cookie: nlbi_626733=nidDRBmxkDhYqfjvrg7CCgAAAACQ8uIVl9PHfMK8a29HPDmY; path=/; Domain=.cinesa.es
Set-Cookie: incap_ses_505_626733=b/NLSlpGpC69NAjcXiACB+o/TF0AAAAAGLLmZGxEC4nXDMzm5AKWFw==; path=/; Domain=.cinesa.es
Set-Cookie: ___utmvmtRuEBFs=QrssVCikPEc; path=/; Max-Age=900
+Set-Cookie: ___utmvatRuEBFs=cvd^Ajeia; path=/; Max-Age=900
Set-Cookie: ___utmvbtRuEBFs=DZh
XoFONalR: vtW; path=/; Max-Age=900
X-Iinfo: 10-7040743-7035806 PNNN RT(1565278185321 761) q(0 0 0 -1) r(7 7) U6
X-CDN: Incapsula
That |
There appears to be no way to fix this at the moment. |
I have documented a solution in this thread. |
What problem are you trying to solve?
throws:
Notes:
--http-parser=legacy
It would be nice if we didn't need to override
process.binding('http_parser').HTTPParser
and Got accepted this as a configuration.The text was updated successfully, but these errors were encountered: