Skip to content

Commit 8994bfc

Browse files
Leonardo Alminanaedsiper
authored andcommitted
http_common: moved initializers to correct a bug introduced in PR 9608
Signed-off-by: Leonardo Alminana <[email protected]>
1 parent b8110f9 commit 8994bfc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/flb_http_common.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -519,14 +519,6 @@ int flb_http_request_set_url(struct flb_http_request *request,
519519
return -1;
520520
}
521521

522-
start_of_authority = strstr(local_url, "://");
523-
524-
if (start_of_authority == NULL) {
525-
cfl_sds_destroy(local_url);
526-
527-
return -1;
528-
}
529-
530522
start_of_authorization = NULL;
531523
start_of_query_string = NULL;
532524
start_of_authority = NULL;
@@ -536,6 +528,14 @@ int flb_http_request_set_url(struct flb_http_request *request,
536528
start_of_host = NULL;
537529
start_of_path = NULL;
538530

531+
start_of_authority = strstr(local_url, "://");
532+
533+
if (start_of_authority == NULL) {
534+
cfl_sds_destroy(local_url);
535+
536+
return -1;
537+
}
538+
539539
start_of_authority = &start_of_authority[3];
540540

541541
start_of_path = strstr(start_of_authority, "/");

0 commit comments

Comments
 (0)