我從預計他回ACK(HTTP1/1 200 OK)的設備獲取數據。 我的HTTP服務器在收到標題後自動返回400錯誤請求(我在WareShark上看到)。 也許設備沒有正確構建他的請求。 如何停止服務器不返回錯誤?所以我將能夠繼續與設備溝通。Delphi&Indy httpServer如何停止發送400錯誤請求
感謝
LOG: 192.168.1.141:57565 Stat Connected.
HTTP Connect 192.168.1.141
LOG: 192.168.1.141:57565 Recv 10.4.2017 г. 00:18:43: POST/HTTP/1.1<EOL>
LOG: 192.168.1.141:57565 Recv 10.4.2017 г. 00:18:43: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, text/*, */*<EOL>Accept-Language: en-us<EOL>Content-Type: application/x-www-form-urlencoded<EOL>Accept-Encoding: gzip, deflate<EOL>User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)<EOL>Content-Length: 579<EOL>Connection: Keep-Alive<EOL><EOL><?xml version="1.0"?><EOL><Metrics SiteId="BG-001" Sitename="office Pazardjik"><EOL><Properties><EOL><MacAddress>00:b0:9d:7f:b7:b2</MacAddress><EOL><IpAddress>0.0.0.0</IpAddress><EOL><Timezone>2</Timezone><EOL><DST>1</DST><EOL><DeviceType>0</DeviceType><EOL><SerialNumber>8370098</SerialNumber><EOL></Properties><EOL><ReportData Interval="1"><EOL><Report Date="2017-04-06"><EOL><Object Id="0" DeviceId="BG-001-01" Devicename="Main Entrance" ObjectType="0" Name="Main Entrance"><EOL><Count StartTime="05:31:00" EndTime="05:32:00" Enters="0" Exits="0" Status="0"/><EOL></Object><EOL></Report><EOL></ReportData><EOL></Metrics><EOL>
HTTP Header
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, text/*, */*
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Content-Length: 579
Connection: Keep-Alive
LOG: 192.168.1.141:57565 Sent 10.4.2017 г. 00:18:43: HTTP/1.1 400 Bad Request<EOL>Connection: close<EOL>Content-Length: 0<EOL>Date: Sun, 09 Apr 2017 21:18:43 GMT<EOL><EOL>
LOG: 192.168.1.141:57565 Stat Disconnected.
LOG: 0.0.0.0:0 Stat Disconnected.
你的問題很混亂。請[編輯]您的問題,使其更加清晰,供我們理解。我不明白你的HTTP服務器在哪一邊。你正在寫一個設備連接到的HTTP服務器嗎?或者你的代碼連接到設備上的HTTP服務器?你有問題的代碼在哪裏?你有沒有注意到你日誌中的「Access Violation」錯誤?你的日誌從哪裏來的? –
我創建設備連接的服務器。問題描述在問題中。我的服務器向其停止與我通信的設備返回錯誤。由於我切斷了另一部分代碼,因此訪問衝突錯誤與此無關。 LOG從idHttpServer.Intercept –