从server.com获取HTTP标头的问题 [英] Problem with http headers getting from server.com

查看:201
本文介绍了从server.com获取HTTP标头的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写代理客户端程序,并且
发送CONNECT SHOWIP.COM:80后
接收功能为STUCK.

我在程序中使用Advanced Onion Router连接到127.0.0.1:9050
然后连接到showip.com例如.



在此处下载源代码:
http://people.zeelandnet.nl/stargod/index.html

问题是接收(我类中的winsock函数)挂起了连接.



我想与网站建立匿名连接并获得一些标头
并下载文档.
但是出于某种原因,我认为自己做错了.

有人可以帮我吗?
谢谢.

我尝试过的事情:

在HTTP1.1/r/n/r/n/r/n中添加空格对我不起作用.
发送功能有效,但接收功能已挂起.

I am writing a proxy client program and
after sending CONNECT SHOWIP.COM:80
the receive function IS STUCK.

i am using Advanced Onion Router to in my program connect to 127.0.0.1:9050
and then connect to showip.com for example.



download source code here:
http://people.zeelandnet.nl/stargod/index.html

the problem is the receive (winsock function in my class) hangs the connection.



i want to make anonymous connection to website and get some headers
and download document.
but for some reason i am doing something wrong i think.

can someone please help me.
thank you.

What I have tried:

add spaces to HTTP1.1/r/n/r/n/r/n did not work for me.
The send fucntion works but the receive function is hanging.

推荐答案

好吧,您没有显示代码,因此很难为您提供帮助.我建议您:
  • 使用调试器查看为什么接收例程挂起.
  • 使用免费的HTTP客户端独立测试HTTP通信.
Well, you didn''t show your code so it is difficult to help you. I suggest you to:
  • Use the debugger to see why your receiving routine hangs.
  • Independently test your HTTP communication using a freely available HTTP client.


这篇关于从server.com获取HTTP标头的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆