Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

Commit

Permalink
revert: uri begins with slash
Browse files Browse the repository at this point in the history
	addresses #381
  • Loading branch information
jpmens committed Nov 27, 2018
1 parent 537a822 commit b1c09eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion be-http.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ static int http_post(void *handle, char *uri, const char *clientid, const char *
return BACKEND_ERROR;
}

snprintf(url, sizeof(url), "%s://%s:%d/%s",
// uri begins with a slash
snprintf(url, sizeof(url), "%s://%s:%d%s",
strcmp(conf->with_tls, "true") == 0 ? "https" : "http",
conf->hostname ? conf->hostname : "127.0.0.1",
conf->port,
Expand Down
3 changes: 2 additions & 1 deletion be-jwt.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ static int http_post(void *handle, char *uri, const char *clientid, const char *

//_log(LOG_NOTICE, "u=%s p=%s t=%s acc=%d", username, password, topic, acc);

snprintf(url, sizeof(url), "%s://%s:%d/%s",
// uri begins with a slash
snprintf(url, sizeof(url), "%s://%s:%d%s",
strcmp(conf->with_tls, "true") == 0 ? "https" : "http",
conf->hostname ? conf->hostname : conf->ip,
conf->port,
Expand Down

0 comments on commit b1c09eb

Please sign in to comment.