Forum Discussion
0xFF in a get
Hallo,
have a GET that ends with 0xFF.
This 0xFF is a character used as a flushing char by the modem (we are in a microcontroller).
I cannot change the firmware on this microcontroller.
The problem is that this GET that ends with 0xFF is not accepted, or, I mean, the correct part of the get is processed, but the last character has seen as a new http request and the system reply with an error.
This is the http flow (The char in red [.] is the byte 0xFF that is not codified correctly):
GET /req.php?pid=2 HTTP/1.1
Host: 22.22.22.22
Connection: Keep-Alive
.HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Wed, 12 Oct 2022 07:47:48 GMT
Content-Length: 18
OK!!!HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Server: Microsoft-HTTPAPI/2.0
Date: Wed, 12 Oct 2022 07:47:48 GMT
Connection: close
Content-Length: 326
<!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 Verb</h2>
<hr><p>HTTP Error 400. The request verb is invalid.</p>
</BODY></HTML>
Is there a way to set IIS-HTTP.SYS in order to not have the Bad request?
Thank you.
Chiara.