Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Alexandre Julliard
Robert Shearman <[EMAIL PROTECTED]> writes: > In this case, it is. The "Basic" string should be followed by some > additional data which is parsed later. Yes, but AFAICS it's still supposed to be a separate token, so you'd need to check for a token separator. I don't think "Basically" should be c

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: Hmm, it seems strncmpiW already does that for me so I'm a little confused: int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) { int ret = 0; for ( ; n > 0; n--, str1++, str2++) if ((ret = to

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Alexandre Julliard
Robert Shearman <[EMAIL PROTECTED]> writes: > Hmm, it seems strncmpiW already does that for me so I'm a little confused: >> int strncmpiW( const WCHAR *str1, const WCHAR *str2, int n ) >> { >> int ret = 0; >> for ( ; n > 0; n--, str1++, str2++) >> if ((ret = tolowerW(*str1) - tolow

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Juan Lang wrote: Hi Rob, +static UINT HTTP_DecodeBase64(LPCWSTR base64, LPSTR bin); Do we really have to keep proliferating base64 implementations? Could you not implement CryptStringToBinaryW instead? Should be mostly a copy-paste job.. CryptStringToBinaryW is a lot more complicated t

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-18 Thread Robert Shearman
Alexandre Julliard wrote: Robert Shearman <[EMAIL PROTECTED]> writes: +if (strncmpiW(pszAuthValue, szBasic, sizeof(szBasic)/sizeof(szBasic[0])-1)) +{ When using strncmp you need to also check that you reached the end of the first string. Hmm, it seems strncmpiW a

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-15 Thread Juan Lang
Hi Rob, +static UINT HTTP_DecodeBase64(LPCWSTR base64, LPSTR bin); Do we really have to keep proliferating base64 implementations? Could you not implement CryptStringToBinaryW instead? Should be mostly a copy-paste job.. --Juan ___

Re: wininet: Add support for SSPI authentication for HTTP.

2007-05-15 Thread Alexandre Julliard
Robert Shearman <[EMAIL PROTECTED]> writes: > +if (strncmpiW(pszAuthValue, szBasic, > sizeof(szBasic)/sizeof(szBasic[0])-1)) > +{ When using strncmp you need to also check that you reached the end of the first string. > +/* compare against last character to be set to avoid a