Skip to content

Commit 8632191

Browse files
committed
Fix constant in RequestHandler_WinHTTP
Formally the documentation says -1L instead of just -1, but DWORD is 32-bit [1] which is the same as int [2], thus this should not matter. [1]: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types [2]: https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=vs-2019
1 parent 3f334aa commit 8632191

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/RequestHandler_WinHTTP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ RequestHandler_WinHTTP_PostBuilder::add_argument(basic_Error & e, char const* ke
4848

4949
using namespace errors::RequestHandler_WinHTTP;
5050

51+
// TODO: separator_ is initialized to ' ', move this to a constant?
5152
if (separator_ == ' ') { separator_ = '&'; }
5253
else { postfields_ += separator_; }
5354

@@ -120,7 +121,7 @@ RequestHandler_WinHTTP_PostBuilder::make(basic_Error & e)
120121

121122
result = WinHttpSendRequest( hRequest
122123
, L"Content-Type: application/x-www-form-urlencoded"
123-
, -1
124+
, -1L
124125
, (LPVOID *)postfields_.c_str()
125126
, (DWORD)postfields_.size()
126127
, (DWORD)postfields_.size()

0 commit comments

Comments
 (0)