Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 7524
0 votes
1 answer
95 views

Server ensure path exists

In server.c to ensure the path exists I use this code: if (access(path, F_OK) == -1) { error(404); continue; } This leads to a 404 error even when the path exists. … For example, if the request (using telnet) is GET /cat.html HTTP/1.1 Using gdb or printf statements, path is: /home/jharvard/Dropbox/pset6/public/cat.html Yet the return value of access (if …
0 votes
Accepted

Server ensure path exists

Turns out I had lots of errors sprinkled throughout my code. I basically debugged my code line by line on paper and checking how strings and pointers were updating. I had many errors in my pointer ari …
minniebot's user avatar