oddly enough there's a "libcurl vs wininet" page on curl's site ...

https://curl.haxx.se/libcurl/wininet.html



On Thursday, February 25, 2016 at 10:19:41 AM UTC+1, Dave S wrote:
>
> On Thursday, February 25, 2016 at 12:12:28 AM UTC-8, Niphlod wrote:
>>
>> if wininet can't do basic auth, is it web2py's fault ?!?!?!
>> curl is available also on windows :-P and it's pretty much the de-facto 
>> reference. if it works with curl but not with wininet, it's wininet fault.
>>
>
> So it seems.
>  
>
>>
>> as for digest auth, no, web2py doesn't support it out of the box.
>>
>>
> Alas.
>
> /dps
>  
>
>> On Thursday, February 25, 2016 at 1:06:20 AM UTC+1, Dave S wrote:
>>>
>>>
>>>
>>> On Tuesday, February 23, 2016 at 12:39:27 PM UTC-8, Dave S wrote:
>>>>
>>>> I'm trying to use Basic Auth with my restful service; see
>>>> <URL:
>>>> http://web2py.com/books/default/chapter/29/10/services#Access-Control)
>>>> for my starting point, although I'm doing a post.
>>>>
>>>
>>>
>>> Also, does Web2Py support Digest auth?
>>> <URL:http://www.ietf.org/rfc/rfc2617.txt>
>>>
>>> /dps
>>>  
>>>
>>>>
>>>> curl --request POST -TransferEncoding C:\dir1\test1.txt --user 
>>>> us...@servery.com:pwd1 http:
>>>> //ww.zz.uu.39/uploader/default/shove/upstuff/ 
>>>> <http://52.34.144.39/uploader/default/shove/uploadf/ServicesAPI.log>
>>>> test1.txt
>>>>
>>>> This works fine from the command line (centos or Win7, as long as curl 
>>>> is installed).
>>>>
>>>> And I successfully used this with libcurl in my Windows test client ("
>>>> us...@servery.com" --> "user%40servery.com").  Tcpdump on the server 
>>>> shows the u/p fields moved to an "Authorization:" header (Basic).
>>>>
>>>> When I try this from WinINet functions, the u/p stuff in the URL is 
>>>> stripped but no "Authorization:" header is added.  Setting the u/p in 
>>>> *InternetConnect()* seems to be ignored.  As a result, I get back a 
>>>> 303 redirecting to the login page.  (I'm using shake-the-box Rocket server 
>>>> for prototyping, though I plan to move to nginx later.)
>>>> This MS page suggests that WinINet is expecting a 401, although it 
>>>> isn't clear that applies to Basic Auth or just challenge-response 
>>>> authentication.
>>>> <URL:
>>>> https://msdn.microsoft.com/en-us/library/windows/desktop/aa384220%28v=vs.85%29.aspx
>>>> >
>>>>
>>>> Some StackOverflow hits suggest that I need to prepare the Basic Auth 
>>>> header myself and use the* lpszHeaders* parameter of* 
>>>> HttpSendRequest()*.  Is that my only choice, or am I missing something?
>>>>
>>>> Thanks.
>>>>
>>>> Dave
>>>> /dps
>>>>
>>>>
>>>>
>>>>
>>>>  
>>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to