Page MenuHomePhabricator

HTTP header encoding error
Closed, ResolvedPublic

Description

For some url like https://quarry.wmflabs.org/run/290325/output/0/tsv?download=true the stream is stopped, that results in an https/ssl error

I've temporary disabled the https redirection :

$ curl http://quarry.wmflabs.org/run/290325/output/0/tsv?download=true -v
*   Trying 208.80.155.156...
* TCP_NODELAY set
* Connected to quarry.wmflabs.org (208.80.155.156) port 80 (#0)
> GET /run/290325/output/0/tsv?download=true HTTP/1.1
> Host: quarry.wmflabs.org
> User-Agent: curl/7.57.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< Server: nginx/1.13.6
< Date: Sun, 16 Sep 2018 09:34:43 GMT
< Content-Type: text/csv
< Content-Length: 15504
< Connection: keep-alive
< X-Clacks-Overhead: GNU Terry Pratchett
< 
* transfer closed with 15504 bytes remaining to read
* stopped the pause stream!
* Closing connection 0
curl: (18) transfer closed with 15504 bytes remaining to read
Sep 16 09:34:39 quarry-web-01 uwsgi-quarry-web[14024]: [pid: 14038|app: 0|req: 12511/33660] 10.68.21.68 () {38 vars in 510 bytes} [Sun Sep 16 09:34:39 2018] GET /run/290325/out
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]: Traceback (most recent call last):
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:   File "/srv/quarry/venv/lib/python3.5/site-packages/flask/app.py", line 2309, in __call__
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:     return self.wsgi_app(environ, start_response)
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:   File "/srv/quarry/venv/lib/python3.5/site-packages/flask/app.py", line 2299, in wsgi_app
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:     return response(environ, start_response)
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:   File "/srv/quarry/venv/lib/python3.5/site-packages/werkzeug/wrappers.py", line 1326, in __call__
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]:     start_response(status, headers)
Sep 16 09:34:43 quarry-web-01 uwsgi-quarry-web[14024]: TypeError: http header must be encodable in latin1

Event Timeline

Change 460760 had a related patch set uploaded (by Zhuyifei1999; owner: Zhuyifei1999):
[analytics/quarry/web@master] Get rid of ?download=true

https://gerrit.wikimedia.org/r/460760

Change 460760 merged by jenkins-bot:
[analytics/quarry/web@master] Get rid of ?download=true

https://gerrit.wikimedia.org/r/460760

Framawiki assigned this task to zhuyifei1999.