[질문] WEB에서 POST로 Data를 갖고 올때 연결 끊어짐 현상.

haewoo의 이미지

밑에 답변 주신 분들게 먼저 감사드립니다.

WEB의 HTTP HEADER를 보여주는 Tool을 구해서도 Test를 해봤는데요.

해당 Site에 POST로 Data를 넘기면 그 결과가 나타나야 하는데 Data가 나타나기 전에 연결이 끊어집니다.

Test는 Telnet으로 80 Port를 열고 Test를 했습니다. DATA를 입력하는 Page의 내용은 잘 가지고 오는데....

Data 입력후 그 결과를 표시하는 Data는 Connection이 끊어져서 받을 수가 없거든요? 이런 현상은 어떻게 처리해야 하나요???

이번에도 도움 부탁드리겠습니다.

Web Browser를 사용시 URL은 다음과 같은 사이트입니다.

Quote:
1. http://neptune.dti.ad.jp/ixp2-lg.html 주소에서 Query를 Trace 선택, IP Address를 입력
2. Submit 버튼 누름.
3. 결과가 http://neptune.dti.ad.jp/cgi-bin/lg.pl에 나타납니다.

Browser를 이용하지 않고 telnet을 이용했을 시의 입력내용 및 결과내용입니다.

Quote:
telnet neptune.dti.ad.jp 80
Trying 202.216.248.126...
Connected to neptune.dti.ad.jp.
Escape character is '^]'.
POST /cgi-bin/lg.pl HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd
.ms-powerpoint, application/msword, */*
Referer: http://neptune.dti.ad.jp/ixp2-lg.html
Accept-Language: ko
Content-Type: application/x-www-form-urlencoded
Connection: Close
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Host: neptune.dti.ad.jp
Content-Length: 56
Pragma: no-cache

Data found after header end:

mode=ipv4&query=trace&addr=211.216.50.196&target=nspixp2
HTTP/1.0 200 OK
Date: Fri, 28 Nov 2003 01:47:54 GMT
Content-Type: text/html; charset=ISO-8859-1
Server: Apache/2.0.48 (Unix)
Via: 1.1 NC6100-4 (NetCache NetApp/5.3R1D1)

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>DTI Looking Glass [Configuration Error]</title>
<link rev="made" href="mailto:kunitake%40dti.ad.jp" />
</head><body><HR><CENTER><H2>DTI Looking Glass [Configuration Error]</H2></CENTER><HR>
<CENTER>Query: trace<BR>
</CENTER>
I don't have your target router's information.<BR>
Maybe miss configuration...<BR>
Please contact your admin(kawahara@dti.ad.jp).<BR>
MSG: target is
<HR>
</body></html>Connection closed by foreign host.


위에 처럼 결과가 나오는 것이 아니라 오류 메시지(? )가 나오고 커넥션이 끊어 집니다.
(입력내용은 HTTP Intercptor Version 1.2M를 이용하여 얻은 Header의 내용을 telnet으로 접속해서 보낸 것 입니다.)
이런 경우는 어떻게 해야 하나요??? 또한 커넥션이 끊어 지면 그 결과를 받을수 있는 방법은 없나요??
최병현의 이미지

혹시 일일이 키보드로 입력하신 것은 아니지요?
키보드로 입력하다 보면 서버측 waiting time에 걸려서 끊어 집니다.
복사해서 같다 붙이는 형태로 사용해 보시면 될겁니다.

To be a rich

danielkim의 이미지

안녕하십니까
Daniel Kim 입니다.
로그를 보니 web 전송 규격상으로는 극히 정상적인 처리 결과를 보입니다.
아래의 코드중 Connection:Close 라는 부분이 보일 것입니다
이것은 client (browser)가 web 서버에게 나는 이번 요청 한번을 보내고
나면 Connection을 죽어 주세요 라는 명령입니다.
따라서 서버는 충실하게 처리 결과를 200 OK로 응답한 후 CONNECTION을
끊게 됩니다.

So If you want to make connection keep alive use "Keepalive" command instead of "Close" if Next requesting Web Server is the same Web server . if Not the same one , then make new connection and do the same process as your code
Goog Luck !!!!

Accept-Language: ko 
Content-Type: application/x-www-form-urlencoded 
Connection: Close 
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322) 
Host: neptune.dti.ad.jp 
Content-Length: 56 
Pragma: no-cache 

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.