This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
Getting 400 Bad Request on second call to same host #14
Closed
Description
400 Bad Request
First time I request data from my server it works. If I call it again, I get a 400 Bad Request.
The funny thing is it doesn't happen when connecting to the sample URLs.
Steps to Reproduce
Use your own examples but change the URL you are GET'ing from to https://yocal.dk/test.txt
Expected behavior
Same response both times
Actual behavior
First request returns 200, second request returns 400
Log
First request:
[AHTTPS] open( GET , url = https://yocal.dk/test.txt
[AHTTPS] open: connecting to hostname = yocal.dk:443
[AHTTPS] _client->connecting to yocal.dk , 443
[AHTTPS] client.connect OK to yocal.dk , 443
[AHTTPS] _onError handler SSL error = OK
**************************************
Response code: 200
Response text: Test :)
**************************************
Second request
[AHTTPS] open( GET , url = https://yocal.dk/test.txt
[AHTTPS] open: already connected
**************************************
Response code: 400
Response text: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Hostname</h2>
<hr><p>HTTP Error 400. The request hostname is invalid.</p>
</BODY></HTML>
**************************************
Information
Could it be related to: #12 ?