I have many takes on your implementation. in the sunny day scenario, your parse function should work if you fixed the problems hinted at below:
are you sure you're terminating method correctly?
are you sure you're not accessing elements that are beyond line?
are you sure you're allocating memory for req_target that is big enough to hold the null terminator?
These kinds of problems occur if abs_path is not properly null terminated. You mention in an earlier post that you are using strncpy. From the man page for strncpy:
Warning: If there
is no null byte among the first n bytes of src, the
string placed in dest will not be null-terminated.
You may be asking How could it work the first time? ...