My main issue is doing this without using the heap, I think. I set up arrays for each of the pieces of the request-line (e.g. method, request-target, etc.) and set all of them to be of length = strlen(line) (i.e., the length of the entire request-line) to avoid segfaults, but all the extra elements in the array are garbage values that I can't seem to convince the program to ignore.
I tried tracking the last character I put into an array before moving on to the next one, and then going to request_line_array[final_character_index + 1] and setting that equal to '\0', but then when I go to take the value from that same array and tell it to stop once it hits a \0 character, it continues printing a bunch of question marks embedded in little diamonds as the garbage characters.
At this point, I am working on making a set of counters that all keep track of how many characters are in each request-line substring so that I can re-make those same arrays with the exact length needed to fit what I need to fit, but I am wondering if there is an easier route than this.