HTTP.jl icon indicating copy to clipboard operation
HTTP.jl copied to clipboard

Setup Request.url on the server side (issue #1041)

Open edyu opened this issue 2 years ago • 8 comments

#1041 describes what I need. The fact request.url exists would make the user of the package want to use it but having it always empty and that you have to call URI(request.target).path is not obvious. It's a one line change because I don't want to change the other gethandler functions.

edyu avatar May 24 '23 17:05 edyu

Hmmm, weird that this seems to be causing downloads tests to fail? I'm not sure why that would be. I can help take a look next week, but feel free to try to dig in in the mean time.

quinnj avatar May 24 '23 23:05 quinnj

Hmmmm, @oxinabox, do you happen to know if the "http://test.greenbytes.de/tech/tc2231/inlwithasciifilenamepdf.asis" url somehow changed what it's returning? I've honestly never looked at the downloads.jl tests in much detail, so it's curious why they're failing all the sudden.

quinnj avatar May 24 '23 23:05 quinnj

Hmm it seems that tester service is broken. It is also not responding correctly for in FireFox. and curl http://test.greenbytes.de/tech/tc2231/inlwithasciifilenamepdf.asis -O -J is returning the wrong filename It is also givng inlwithasciifilenamepdf.asis but the whole point of that test case is that it should give the filename foo.pdf because that's what the response header has.

I think their webserver might be broken.

oxinabox avatar May 25 '23 03:05 oxinabox

Yeah, that's kind of what I suspected as well. We recently switched to use the JuliaHub-hosted httpbin; I wonder if we could utilize that for these tests as well (they're still occasionally flaky, but much more robust than any other test service we've ever used)

quinnj avatar May 25 '23 03:05 quinnj

The only test cases we use are:

  • http://test.greenbytes.de/tech/tc2231/#inlwithasciifilenamepdf
  • http://test.greenbytes.de/tech/tc2231/#attonlyquoted
  • http://test.greenbytes.de/tech/tc2231/#attwithasciifnescapedquote

Those links fully describe them. They require the webserver to set some fields in the response

Which HTTP-Bin does not have examples of. We could possibly put together our own little example of this, and run it on a JuliaHub hosted webserver. Or find something reliable the happens to have these properties (maybe AWS S3?)

oxinabox avatar May 25 '23 03:05 oxinabox

Yeah, some of these errors are over my head tbh. Thanks for looking into the errors but not sure what I can do here.

edyu avatar May 25 '23 17:05 edyu