Questions tagged [parse]
The parse tag has no usage guidance.
15 questions with no upvoted or accepted answers
1
vote
0
answers
319
views
parse error: no such table
I'm currently on week 1 of cs50's SQL course, running into some issues with the exercise.
Running the code from both the file and the terminal results in a no such table, despite me already ...
1
vote
1
answer
99
views
Help with parse
I'm getting two errors with check 50 and am struggling to understand how to go about this.
:( Requesting cat.exe returns error code 501
\ expected output, but not "HTTP/1.1 505 HTTP Version Not ...
1
vote
1
answer
148
views
Parse wont pass check50
for some reason my code isnt passing:
:( Two spaces after GET returns error code
&
:( Two spaces before HTTP/1.1 returns error code
I cant see what would cause that.
A previous question indicates ...
1
vote
0
answers
1k
views
PSET 6 Server.c Parse Method
I am currently writing the parse method for pset6 server.c. I have rewritten it many times and I have never gotten it to work. I currently am getting 403 forbidden every time I try to run it. Here is ...
0
votes
1
answer
31
views
pset6 parse function fails "hello.php?" test
My code passes all but 1 test. This is the error:
:( Requesting hello.php? returns 200, text/html, and correct output
\ expected output, not an exit code of 0
Can you see what the problem is??
...
0
votes
1
answer
78
views
pset6 Parse - help with pointers
I am taking this course online. I do not have anyone to ask for help that knows anything about coding so I rely 100% on this discussion board (and the internet in general) for help. I am having ...
0
votes
1
answer
45
views
Why might my parse return seg.fault to check50?
Below is my parse function in server.c pset6; The code is not fully commented yet, my bad; Nonetheless, why are all exit code 0 in check50, where is the loophole? Thank you.
bool parse(const char* ...
0
votes
1
answer
66
views
Pset6 Parse Errors in Check50
bool parse(const char* line, char* abs_path, char* query)
{
const char* sp1 = strchr(line, ' ');
const char* sp2 = strrchr(line, ' ');
const char* slash = "/";
const char* crlf = ...
0
votes
1
answer
54
views
After implementing parse, should all checks be green?
I am working on pset6, after implementing parse(), we are instructed to use check50.
check50 2015.fall.pset6.server1 server.c
At this point, I haven't done any code for query, load() or indexes(). ...
0
votes
1
answer
81
views
Problem with parse function
When i run Check50 (server1) , It shows me the following errors AFTER EDIT :
:( HTTP/1.0 returns error code 505
\ expected output, but not "HTTP/1.1 404 Not Found\r\nContent-Type:..."
:( ...
0
votes
1
answer
114
views
What should be stored in abs_path and query if this request line is passed to parse?
If my request line is-
GET /hello.php?name=mike HTTP/1.1
What should be stored in abs_path and query fields?
and if my request line is-
GET /hello.html HTTP/1.1
then what should be stored in abs_path ...
0
votes
1
answer
48
views
PSET6: Question with Mallocing char* for PARSE
I'm currently working on PSET6 and had a question for the parsing section. I decided to use strtok() and as a result, will need to malloc memory when creating new char*. How do i know how much memory ...
0
votes
1
answer
310
views
Parse Function: Extra characters in string after using memcpy
My parse function works for the root directory, but for subsequent requests for, say, cat.jpg, the memcpy function seems to copy an extra \220 into both requesttarget and HTTPversion (so, for instance,...
0
votes
1
answer
251
views
pset6 redirect loop
I can't figure out what is wrong with my code, and I don't know where the issue is. I have tried to figure it out by putting printf calls everywhere, and it appears that my parse function works as ...
0
votes
1
answer
210
views
Failed to parse caesar.c
I am doing problem set 2 and i am getting the error
Failed to parse caesar.c.
The code passes all steps in check50 but no matter how I reformat the lines I cannot get it to work.
I don't want to ...