From the instructions:
absolute-path [ "?" query ]
whereby absolute-path (which will not contain ?) must start with / and might optionally be
followed by a ? followed by a query, which may not contain ".
Notice, the "?" is inside the [ optional clause ], so you may assume that it is not part of absolute-path.
Store at the address in ...
So it looks like abs_path and query weren't properly being updated inside of my parse function, despite the printf results looking good. In main(), abs_path and query were empty.
// if request target has a ?
abs_path = strtok(request_target_copy, "?");
query = strtok(NULL, "?");
if (query == NULL)
query = "";