Jump to content
Xameleon

Strange Empty TCPRecv

Recommended Posts

Xameleon

Greeting, forum members. Please could You help me with understanding TCPRecv mechanism. I'm building simple http service. I've already made first steps:

1) Created main listening socket.

2) Made a loop with TCPAccept waiting for accepting socket

3) Started browser and made a query to my service http://127.0.0.1:8080

3) Received socket data.

But, unfortunatly I receive some empty request from browser @_@. What could it be ? I mean, I receive 3 request. Two of them are normal (one is simple get, second is a query for favicon) and the third is empty. 

21:12:56: Service started
21:13:01: Accepted connection. Socket 628
21:13:01: Request length:420
21:13:01: GET / HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4


21:13:01: Accepted connection. Socket 628
21:13:01: Request length:380
21:13:01: GET /favicon.ico HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
Accept: */*
Referer: http://127.0.0.1:8080/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4


21:13:01: Accepted connection. Socket 628
21:13:01: Request length:0
21:13:01: 

21:13:11: Service stopped

 That's my log. Result is the same for Chrome and IE. Please give me advice - what am I doing wrong ?

server.au3

Edited by Xameleon

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.