AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Jul 22, 2002, 06:41   #1
Студент
 
Join Date: Mar 2002
Location: [ Surrealistical World ]
Posts: 312
Rep Power: 7
Reputation: 10
Post Proxy::

Heya.

How are you. Look. I'm writing a proxy server. Let's assume that it is running on localhost.
I'm configuring my browser's proxy for localhost, then trying to connect to a site. What proxy server has to do is to reply to any requests on xxxx port a simple html. So. I type 'http://xxxxxxx', browser starts to 'navigate'. It lasts till I CLOSE the proxy server. When I EXIT it, browser shows that HTML that proxy server sends. Question:: WHY??
Kstatye, a ved' inogda on pokazyvaet srazu... Stranno.
Maybe I should send some special character after data?? [EOF ya uzhe proboval - ne rabotaet].

Rgdz,
SiLVER..
__________________
::Against the crowd.
Rust is offline   Reply With Quote Quote selected
Old Jul 22, 2002, 08:23   #2
Студент
 
Join Date: Jun 2002
Location: Yerevan
Posts: 258
Rep Power: 7
Reputation: 10
Post

Esli data kotoryj ty posylaesh' browser-u ne chunked, to togda ty Content-Length specify delaesh' v response? A esli chunked to 0 v konce ne zabud'. Esli ne ot etogo skagi chto imenno posylaesh' v http header-e, razberemsya. Posmotri esche Connection field.

Vot rfc:
http://www.w3.org/Protocols/rfc2616/rfc2616.html
__________________
http://www.d-brane.com
Eddi is offline   Reply With Quote Quote selected
Old Jul 23, 2002, 08:06   #3
Студент
 
Join Date: Mar 2002
Location: [ Surrealistical World ]
Posts: 312
Rep Power: 7
Reputation: 10
Post

Hello Eddi.

Actually the matter was in the other thing...
I'll explain it for future if someone will have that question.
Look. When a browser sends you a connection request, you accept his connection, therefore open a new socket for him, and start to work through that socket. Well I tried everything to show the browser that I'm over with data... Nothing helped... Neither Content-Length, nor sending even EOF. The answer is MUUUUCH simpler You have just to CLOSE that socket when Winsock_SendComplete() event is generated by Windows. Anyway thanks.

Regards,
SiLVER..
__________________
::Against the crowd.
Rust is offline   Reply With Quote Quote selected
Old Jul 23, 2002, 09:16   #4
Студент
 
Join Date: Jun 2002
Location: Yerevan
Posts: 258
Rep Power: 7
Reputation: 10
Post

Good then
Just one note. Connection field specifies what should happen to the connection, and if the browser sends you keep-alive, then I guess you don't need to close it, otherwise, if it sends you close, you have to close it. (that's why I told to look up the connection field in rfc, there are some other notes there about what proxies themselves are supposed to send to the host they are connecting to )
__________________
http://www.d-brane.com
Eddi is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 13:26.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link