if ( !HttpSendRequest(m_hRequest, _T("Content-Type:
application/x-www-form-urlencoded"), (DWORD)-1L,
(LPVOID)strPostBlock.c_str(), nPostBlock) )
{ ... }
이런 코드를 배껴와서 이용해보니 IE6.0인 PC에서는 에러가 발생했다.{ ... }
GetLastError()로 확인해 보니 12150 Error였다.
ERROR_HTTP_HEADER_NOT_FOUND (12150 - The requested header could not be located.)
이것의 원인을 몰라 여기저기 찾아 봤더니 아래와 같은 내용이 있었다.
살짝만 읽어 보면 누구나 눈치첸다. content-length 그래서 아래처럼 바꿨더니 모든 PC환경에서 잘 돌아갔다.
tstring tstrHeader = _T("Content-Type: application/x-www-form-urlencoded");
if ( !HttpSendRequest(m_hRequest, tstrHeader.c_str(), (DWORD)tstrHeader.length(), (LPVOID)strPostBlock.c_str(), nPostBlock) )
{ ... }
if ( !HttpSendRequest(m_hRequest, tstrHeader.c_str(), (DWORD)tstrHeader.length(), (LPVOID)strPostBlock.c_str(), nPostBlock) )
{ ... }
'Development' 카테고리의 다른 글
[C++ compile] 기존에 LIB 를 직업 추가해서 에러가 발생해서요 (0) | 2010.05.18 |
---|---|
[Doxygen] enumeration 작성법 (0) | 2010.05.06 |
[Windows] KNOWNFOLDERID (0) | 2009.08.25 |
[Java Script] Array의 Sort Method (0) | 2009.06.22 |
[ASCII Code] 아스키 그래픽 문자 보기 (0) | 2009.04.21 |