I have started using Request.File to return PDF files via HandleSpecialURL (See my previous post )
This works fine but when I try to run my webservice via SSL, only part of the document is downloaded. The PDF viewer then tells me that the PDF is not viewable. This only happens if the file is large. Small files are downloaded fine.
Do I need to set any Headers or other parameters to make the Request.File method work over SSL?
There’s nothing wrong with the PDF. I can open the file and view it correctly on the server. I can download it fine using HTTP. If I try to download it using HTTPS, it only downloads the first chunk.
@Greg O’Lone I don’t believe so. Both the SSL and Non-SSL versions are running on the same instance of the application. The application is still up and running and accepting connections.
The links above are a test app with just those 3 lines of code in the HandleSpecialURL. Our real world application behaves in exactly the same way on our clients servers.
I’ve just added some code to the UnhandledException event to print a message to the console if an error has occurred but no error is showing.
@Greg O’Lone Sorry to hassle Greg but can you confirm whether this is a Xojo issue or is there anything I can do to fix this? I’m getting hassled by my customers and I don’t know what the score is. Thanks
I’m not sure how you access HTTP ports so not sure if it’s relevant. However, the symptoms are exactly the same as we are experiencing.
This article is discussing the MinBytesPerSecond HTTP parameter with the Windows APIs. Is this relevant to how you are accessing the HTTP ports?
I’ve checked our HTTP logs and we are not seeing the “Timer_MinBytesPerSecond” error they mention. We also don’t have the "MinBytesPerSecond " registry setting.
That article is talking about a bug in the http/2.0 implementation on IIS. We dont use IIS for the web server and the current web framework doesnt support http/2.0, so I cant see how that info is relevant unless youre using IIS as a reverse proxy in front of your app.
I would appear to be having a similar issue on 2019-r1.1 standalone web. I have a file that I want the user to download, I use this code in the HandleSpecialURL event handler.
Request.File = f
Request.Status = 200
Return True
It seems to connect and start the download but only grabs the first 200kB to 500kB (in this case 319,573B, every time) using chrome.
Headers show the length of the file is correct:
Connection: close
Content-Description: File Transfer
Content-Disposition: attachment; filename="***.***"
Content-Encoding: gzip
Content-Length: 32521391
Content-Type: application/octet-stream
I am using LetsEncrypt to provide an SSL cert, Ubuntu 16.04 Server, Chrome on macOS to download the file.