[완료] Wince HTTP접속 중 알수 없는 오류

bluesolip의 이미지

안녕하세요.
다음과 같이 wince에서 통신은 가능한 상태에서 HTTP로 url 접속을 하려고 하는데 원인을 모르고 있어 도움 부탁드립니다.

GetLastError()의 오류 내용은 다음과 같습니다.
[E] Fail to InternetOpenUrl:12031

12031 ERROR_INTERNET_CONNECTION_RESET
The connection with the server has been reset.

코드내용중 어떤걸 확인해야 할지나 오류내용있으면 도움 부탁드립니다.
아래는 코드입니다.

int AADlg::getFileFromHttp(char* pszUrl, char* pszFile)
{
HINTERNET hInet, hUrl;
DWORD dwReadSize = 0;

// WinINet함수 초기화
if ((hInet = InternetOpen(_T("Web"), // user agent in the HTTP protocol
INTERNET_OPEN_TYPE_DIRECT, // AccessType
NULL, // ProxyName
NULL, // ProxyBypass
0)) != NULL) // Options
{
// 입력된 HTTP주소를 열기
if ((hUrl = InternetOpenUrl(hInet, // 인터넷 세션의 핸들
L"http://www.google.com",
NULL,
0,
0,
0)) != NULL)
{
// 인터넷 핸들 닫기
InternetCloseHandle(hUrl);
}
else
{
RETAILMSG(1,(TEXT ("[E] Fail to InternetOpenUrl:%d\r\n"), GetLastError()));
}

// 인터넷 핸들 닫기
InternetCloseHandle(hInet);

}

return 0;
}

Lipi의 이미지

서버가 HTTPS페이지로 redirection을 하고 WinCE가 HTTPS를 암호화 수준이 낮은 버전만 지원해서 서버에서 TCP를 종료해버리는 걸로 추정됩니다.

네이버는 redirection을 하지 않는 것으로 보이니 그곳으로 접속 테스트를 해 보면 어떨까요?

bluesolip의 이미지

답글 남겨주셔서 감사합니다.

변경해서 시도해봐도 동일하네요.
한가지 의문이 드는게 동일코드를 win32로 해보면 정상적으로 되고 wince상에서는 위와같은 문제가 발생합니다.
wince에서 InternetOpenUrl()이 동작을 제대로 안하는게 아닌지 궁금합니다.

혹시 알고계시거나 wince상에서 동작하는 예제가 있으면 알려주시길 부탁드립니다.
감사합니다.

Lipi의 이미지

네트워크 패킷 파일을 캡쳐하는 방법을 통해 PCAP파일을 보면 추정이 아닌 좀 더 정확한 이유를 알 수 있을 것 같아 보입니다.

bluesolip의 이미지

답변이 늦어서 죄송합니다.

일단 도저히 알수가 없어 그냥 소켓열어서 파일 다운로드 하는 방식으로 바꾸었습니다.
신경써 주셔서 감사합니다.

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.