Skip to content

Commit 0750f6a

Browse files
committed
Fixed basic HTTP authentication for WSDL sub requests.
1 parent 43a0ee7 commit 0750f6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/soap/php_sdl.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@ void sdl_set_uri_credentials(sdlCtx *ctx, char *uri TSRMLS_DC)
237237
s = strstr(ctx->sdl->source, "://");
238238
if (!s) return;
239239
s = strchr(s+3, '/');
240-
l1 = s - ctx->sdl->source;
240+
l1 = s ? (s - ctx->sdl->source) : strlen(ctx->sdl->source);
241241
s = strstr((char*)uri, "://");
242242
if (!s) return;
243243
s = strchr(s+3, '/');
244-
l2 = s - (char*)uri;
244+
l2 = s ? (s - (char*)uri) : strlen((char*)uri);
245245
if (l1 != l2) {
246246
/* check for http://...:80/ */
247247
if (l1 > 11 &&

0 commit comments

Comments
 (0)