Questions tagged [parse]
The parse tag has no usage guidance.
14 questions
0
votes
1
answer
328
views
Check50. I need help with server.c, specifically with the parse function I guess. Thanks
I have just finished the 4 functions from Pset 6 (server.c). Well, everything works "fine". If I request /cat.html it returns HTTP/1.1 200 OK and if request cat.exe it returns the most famous server ...
0
votes
1
answer
35
views
Pset6 Web-server - Storing a char* at address of argument(parameter)
Pset6 Web-server... In Parse function, how do you store absolute-path at the address in abs_path?
bool parse(char* line, char* abs_path, char* query)
{
char* absolute-path;
// assume I've ...
0
votes
2
answers
187
views
Pset6 Server Parse Function
Currently working on Pset6 and I can't seem to get the parse function to work. I haven't fully implemented the function but requesting the home page should work. I was wondering if someone could help ...
0
votes
1
answer
93
views
parse function in pset6
When using Check50 on server.c, I get this result:
:) server.c exists
:) server compiles
:) HTTP/1.0 returns error code 505
:( Method of 'abcGET' returns error code 405
\ expected output, ...
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
1
answer
103
views
Pset6: Errors with Check50
When I use check50 to check my parse function, I find that check50 fails multiple tests and that the terminal generates multiple errors. I am using strtok to separate the request line into different ...
0
votes
2
answers
62
views
pset6 server2 parse() strtok() NULL [solved]
This bug was first found here:
pset6 server2 load() fseek() return -1 [SOLVED]
I posted it here to distinguish it from that other bug.
Check50:
$ check50 2015.fall.pset6.server2 server.c
:) server.c ...
0
votes
1
answer
55
views
Pset6 Parse() - How to Approach
I've read the explanation and specification for parse, but I still do not know what I am supposed to do for parse. I've looked at other questions, but I am still confused about the objectives of parse....
0
votes
1
answer
329
views
Pset6 parse function gives error 400
I am working on pset6 and I am having a hard time in parse function. I consistently take Error 400, so if anyone can give me a direction where my mistake is hiding it will be great! Below I have my ...
0
votes
1
answer
428
views
Pset 6 - Parse - Too dynamic?
So I've been working on pset6 for a while now, the hardest thing with it is that it is very hard to test (I use a test.c file to do that and lots of printf functions), and the whole code of server.c ...
0
votes
1
answer
639
views
Server.c Non-existant file and cat.exe question
I'm almost done with parse function, but I get 301 Moved Permanently error in the above mentioned cases. I am aware that .exe is not present in our lookup function, but shouldn't we return NULL in ...
0
votes
1
answer
96
views
pset6 parse HTTP/1.1 error
I can't figure out why I have this error.
Here is my code:
bool parse(const char* line, char* abs_path, char* query)
{
char*...
0
votes
1
answer
201
views
Pset6 server.c Error 403
server.c is giving error(403) inside transfer function (written by default)
lookup function :
const char* lookup(const char* path)
{
char* s=(char*)calloc(20,1);
strcpy(s,"");
char *...
0
votes
1
answer
330
views
pset6; part 1; parse and load
I have already made a first part of this pset, but I have several problems that I can not resolve.
My code pass almost all of the tests except these:
:( Requesting cat.exe returns error code 501
...