nmps

simple network-based command-line rpg wrote in c99
git clone git://git.kocotian.pl/nmps.git
Log | Files | Refs | LICENSE

commit b465d0dd5f937fcff96ccf512dafb575ed7852a8
parent 43da379bc3259b0c368f63be06e100e768955240
Author: kocotian <kocotian@kocotian.pl>
Date:   Mon,  9 Nov 2020 21:26:11 +0100

argv changes

Diffstat:
Mnmps | 0
Mnmps.c | 6+++---
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/nmps b/nmps Binary files differ. diff --git a/nmps.c b/nmps.c @@ -11,7 +11,7 @@ #include "http.h" #include "util.c" -#define VERSION "a0.1.1" +#define VERSION "a0.1.3" extern void herror(const char *s); @@ -26,7 +26,7 @@ authorize(char *host, const char *port, char *username, char *password) { size_t size; char *buffer, *args[] = {username, password, NULL}; - if (!(size = request(host, atoi(port), "/auth", args, &buffer))) + if (!(size = request(host, atoi(port), "auth", args, &buffer))) return 1; else { if(!strcmp(truncateHeader(buffer), "Authorized")) @@ -42,7 +42,7 @@ request(char *hostname, unsigned short port, char *command, char *args[], char **buffer) { char *argv = calloc(0, 1); - char *request_template = "GET %s?argv=%s HTTP/1.0\r\nHost: %s\r\n\r\n"; + char *request_template = "GET /%s HTTP/1.0\r\nargv: %s\r\nHost: %s\r\n\r\n"; char request[BUFSIZ]; int iter = -1, argvsize = 0, request_length; while (args[++iter] != NULL) {