小编Sto*_*kov的帖子

Delphi&Indy httpServer如何停止发送400个错误请求

我从期望他回来ACK(HTTP1/1 200 OK)的设备获取数据.收到标题后我的httpserver会自动返回400 Bad Request(我在WareShark上看到).也许该设备没有正确构建他的请求.如何停止服务器不会返回错误?所以我将能够继续与设备通信.

谢谢


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, …
Run Code Online (Sandbox Code Playgroud)

delphi indy httpserver

-1
推荐指数
1
解决办法
771
查看次数

标签 统计

delphi ×1

httpserver ×1

indy ×1