HttpSendRequest 12005 ERROR_INTERNET_INVALID_URL
2013-04-07 13:58
1146 查看
hConnect = InternetConnect(hInternet, "http://www.csdn.net", INTERNET_DEFAULT_HTTP_PORT, NULL, "HTTP/1.1", INTERNET_SERVICE_HTTP, 0, 0); if(hConnect) { hRequest = HttpOpenRequest(hConnect, "GET", "/article/2013-04-07/2814771-apple-screwed-up-iphone-names", "HTTP/1.1", NULL, NULL, INTERNET_FLAG_RELOAD, 0); bret = HttpSendRequest(hRequest,NULL,0,lpPostData,nPostDataLen); int err = GetLastError(); while(TRUE) { char cReadBuffer[4096]; unsigned long lNumberOfBytesRead; bret = InternetReadFile(hRequest,cReadBuffer,sizeof(cReadBuffer) - 1,&lNumberOfBytesRead); if(!bret || !lNumberOfBytesRead) break; cReadBuffer[lNumberOfBytesRead] = 0; strResponse = strResponse + cReadBuffer; } }
ERROR_INTERNET_INVALID_URL
12005
The URL is invalid.
解决:http://www.csdn.net改为www.csdn.net
参考:http://bbs.csdn.net/topics/390164961
相关文章推荐
- I/O error on PATCH request for "http://localhost:8081/api/users/user/1". Invalid HTTP method: PATCH
- XMLHttpRequest cannot load"url"Cross origin requests are only supported. send @ jquery-2.1.4.js:8630
- HttpWatch中的ERROR_INTERNET_INVALID_URL错误 [此博文包含图片]
- HttpWatch中的ERROR_INTERNET_INVALID_URL错误 [此博文包含图片]
- HttpWatch中的ERROR_INTERNET_INVALID_URL错误
- 问题解决:Error -27492: "HttpSendRequest" failed, Windows error code=12029
- Error Domain=ASIHTTPRequestErrorDomain Code=5 "Unable to create request (bad url?)" UserInfo=0x15f86
- Git提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
- (原)使用TortoiseGit提交代码push的时候报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
- AJAX请求在微信环境报错:NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load
- ASIHTTPRequest Unable to create request (bad url?) Error
- 关于使用Git的时候出现"HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large"的解决方法
- git 提交失败 HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
- ASIHTTPRequest Unable to create request (bad url?) Error
- cinder list 报错:ERROR: Malformed request url (HTTP 400)
- How to resolve the 403 error when send POST request from Postman
- HttpServletRequest 的getRequestURI()和getRequestURL()区别及用法
- HttpServletRequest常用获取URL的方法
- InternalServerError时 HttpWebRequest 的 GetResponse 方法处理策略
- HttpServletRequest的getServletPath、getServletURI、getServletURL等区别 &&如何防止用户通过直接输入URL访问网页