Questions tagged [parse]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

one failed test of server.c :(Two spaces after GET returns error code [duplicate]

I have no idea what's wrong with my parse function! I've tried everything... It fails one test only - :(Two spaces after GET returns error code. Please, help me - I have nobody to ask because I'm ...
user avatar
0 votes
1 answer
76 views

Pset6 Parse: Failing HTTP & non-existant file

I've looked at other questions on this topic but none of the other code is structured like mine, making it hard to compare. I've fixed all the other errors except for two: :( HTTP/1.0 returns error ...
user avatar
0 votes
1 answer
30 views

PSET 6 Parse Function:

Here is my code for the parse function for PSET6. I am not sure why I get the 501 fail. (I'm not told to do the one for 404). bool parse(const char* line, char* abs_path, char* query) { char* ...
user avatar
0 votes
1 answer
34 views

Pset6: Having Issues Running Server.C

I'm trying to debug server.c with gdb, but I can't figure out how to run server.c. The program compiles correctly, but when I use gdb ./server and then run public, server.c runs into an infinite loop....
user avatar
0 votes
1 answer
217 views

PSET6 CS50 - How to Use Strtok()

I am using strtok() to split request_line into multiple variables. However, request_line is not being split correctly and I am receiving errors caused by using strtok(). How can I use strtok() to ...
user avatar
0 votes
1 answer
43 views

PSET6 Parse Segmentation Fault

My parse code seems to work fine but after it runs there is a segmentation fault. It isn't any of the other methods, and I just can't figure out why it is doing this. I think it has something to do ...
user avatar
  • 5
0 votes
1 answer
30 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?? ...
user avatar
  • 1
0 votes
1 answer
58 views

Pset6 - Error With Using GDB

I have been trying to use GDB to find errors in my code. I went through the steps @MARS gave me as an answer to one of my questions. However, when I tried to list the values of my variables by using ...
user avatar
0 votes
1 answer
71 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 ...
user avatar
1 vote
1 answer
102 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 ...
user avatar
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* ...
user avatar
0 votes
1 answer
189 views

PSET6 - PARSE() - Use of Undeclared Identifier Error

I get multiple errors when I try to compile parse, including errors about use of undeclared identifier. Why am I getting this error, even though I declared my variables and assigned them values? Here ...
user avatar
0 votes
1 answer
63 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 = ...
user avatar
0 votes
1 answer
54 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....
user avatar
0 votes
1 answer
27 views

server.c cannot check http_version correctly

I am trying to parse the path but it always gives me the mistake-- I used gdb to trace the value of every char, and find that this line --if (strcmp(http_version,"HTTP/1.1")==0) always turns out to ...
user avatar
0 votes
1 answer
44 views

Need a help with parse function Pset6

i want to implement parse function by breaking the line into 3 parts using strtok() function, store those char* in array and check if they complete conditions we have in pset. But something goes wrong....
user avatar
0 votes
1 answer
33 views

PSET 6 Problem with malloc() on parse function

I can't figure out this problem, I hope someone can help me. My server works perfectly only for the first HTTP request, but when I try to request something else, it throws me an error. This is a copy ...
user avatar
0 votes
1 answer
91 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, ...
user avatar
0 votes
1 answer
45 views

PSET6 Server - fails the request two files in a row check

My server fails the last check in check50-server2 - "request two files in a row" Because it only fails that test I'm assuming the problem is somewhere in the parse or lookup functions. Valgrind shows ...
user avatar
0 votes
1 answer
55 views

pset6 How to tackle check50 on .php?name=Alice

I only have this one problem left in check50. https://sandbox.cs50.net/checks/e3382282d5e64259adec1cc4f51b17de I'm pretty sure the problem is in "load" (but, I could be wrong). I know it is tricky ...
user avatar
  • 17
0 votes
1 answer
44 views

pset6 parse function keeps failing check50 test. Why?

Please I have been trying different ways of soling this problem. Non seems to be working. I tried check50 and got these errors: :) server.c exists :) server compiles :) HTTP/1.0 returns error code ...
user avatar
  • 29
0 votes
1 answer
31 views

pset6 parse sheck50 cat.exe, non-existant file and request target " error 301?

Help!! I'm currently struggling with Parse with check50 reporting three errors as follows: Here is the sandbox report And here is my parse code.. bool parse(const char* line, char* abs_path, char* ...
user avatar
  • 17
0 votes
2 answers
6k views

Split a sentence ito an array of words without using strtok

I need to split a sentence contained in a char pointer into an array of words. I've tried several methods (as I cannot use strtok. The following method I used extracts the different words, but it ...
user avatar
  • 29
0 votes
2 answers
61 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 ...
user avatar
  • 124
0 votes
1 answer
78 views

PSET6: PHP parser not working + different files from Check50?

3 hopefully 'quick' issues if someone could help? [Edit: full code now here for reference - http://pastebin.com/d1jTs1jV] 1) My query parser for php isn't working. I thought believe I've done it ...
user avatar
  • 301
0 votes
1 answer
35 views

Parse cat.exe error in check50

I am having an issue with my parse function when running check50 where requesting cat.exe is returning error 404 as opposed to error 501. I've taken a look at the other questions related to cat.exe ...
user avatar
  • 23
0 votes
1 answer
56 views

Problem when testing pset6 parse method - Segmentation Fault

I've been trying to test each part of the server pset as I go along, and so I copied, pasted, and wrote a little test program to make sure that the pieces are working individually. When I tried ...
user avatar
1 vote
2 answers
78 views

Pset6 check50 server1 parse error

I am having trouble addressing the below two errors when I run the first check50 of pset6. check50 2015.fall.pset6.server1 server.c :( Requesting cat.exe returns error code 501 \ expected output, ...
user avatar
  • 11
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(). ...
user avatar
1 vote
2 answers
125 views

pset6 server fails check50

I can't find why this doesn't work, can someon help me? Thanks. My code fails the following in check50 server1: :( Requesting cat.exe returns error code 501 \ expected output, but not "HTTP/1.1 ...
user avatar
0 votes
1 answer
47 views

pset server parse function check50 errors

I have troubles with the parse function in pset6 server.c. Only two items in the check fails. Im really struggling undertanding what the error messages means, anyone here that understands? If the ...
user avatar
  • 20
0 votes
1 answer
51 views

pset6 parse function gives error in check50 1

I am working on the parse function. My code gives the following results in check50 1. :) request-target of abc/hello.php returns error code 501 :) Requesting cat.exe returns error code 501 :( ...
user avatar
0 votes
1 answer
36 views

abs_path continues to hold on to the previously stored path

As mentioned in the title, the parameter abs_path retains its memory from the previous allocation, resulting in the outputs below. My buffer is reset to NULL on every call to parse() as char buffer[64]...
user avatar
  • 1,223
0 votes
1 answer
127 views

PSET 6 Server errors on a few CS50 checks

I fixed some issues in this but I am still getting errors and can't figure out what is causing them. :( Requesting cat.exe returns error code 501 Expecting the following on standard out ... 501 NOT ...
user avatar
1 vote
1 answer
78 views

PSET6 - server.c, trouble with parse

I thought my parse() function was looking pretty good, but I keep consistently getting the same check50 (server1) error: :( Requesting non-existant file returns error code 404 \ expected output, ...
user avatar
  • 13
0 votes
1 answer
134 views

Pset 6 load and index, totally confused

When i run my code i get a error proxy could not be processed request. During check50 2 everything is red with no reason as to why, I am thinking its a seg fault but valgrind didn't give one. Honestly,...
user avatar
0 votes
1 answer
68 views

Pset6 Server seg fault in load and main (because of parse)

Server is functional and gives the correct output using the curl requests individually. However, using gdb, if I use curl to request hello.html after I've requested cat.html (specifically), I get a ...
user avatar
0 votes
1 answer
80 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:..." :( ...
user avatar
0 votes
1 answer
119 views

PSET6 Server.c cat.exe parse error with check50

I am running through the first half of PSET6 and have everything in check50 green other than the cat.exe section: :( Requesting cat.exe returns error code 501 \ expected output, but not "HTTP/1.1 ...
user avatar
  • 31
1 vote
1 answer
59 views

Parse: Where did cat.exe come from?

I have just finished lookup and parse function and for the first time when I tried to run the first check50 I am getting 2 errors, one for cat.exe and the other one for non-exsistant file, but I dont ...
user avatar
0 votes
1 answer
72 views

Parse: Valgrind giving 4 unconditional jump errors on a test case file

I am doing pset6 and for the parse function I have first started to create about the same inputs in a seperate file and with printfs I have tried to slowly tackle the parse funtion by manually giving ...
user avatar
1 vote
1 answer
57 views

Parse: Question mark part of absolute path or query?

Just wanted to ask if ? is part of absolute path or query or is it seperate from both query and absolute path?
user avatar
0 votes
1 answer
66 views

Pset6 - check50 missing cat.exe and non-existant file request

I've been checking similar questions about the problem I'm having but couldn't solve it myself. Help would be really appreciated. After implementing lookup and parse and running check50 I'm receiving ...
user avatar
  • 9
1 vote
1 answer
70 views

Pset6 parse getting error 501

So, I've finished parse except that whenever I run my code I get error 501 every time. I've figured out that it's also checking the next value in this condition if(strcasecmp (&path [0],"/") != 0)...
user avatar
  • 13
0 votes
1 answer
91 views

pset6 Server.c compiles but server not working

I'm convinced that the issues lie within my parse and/or load function but can't seem to identify them. Maybe I'm incorrectly allocating memory?? I'm not sure. Can someone please help me out? Here's ...
user avatar
1 vote
1 answer
73 views

server.c segmentation fault

I couldn't find the cause of segmentation fault when i run the server I have used valgrind to find where is the memory leaks .. and this is the result : ==2186== Memcheck, a memory error detector ==...
user avatar
0 votes
1 answer
103 views

pset6 2 errors with parse and lookup [duplicate]

i been stuck with these 2 errors for days which i don't really know what causes them..tried debugging parse and as far as i can tell abs_path is working as it should(although i'm not sure it's written ...
user avatar
0 votes
1 answer
281 views

Problem with check50 for server1

I know that when lookup returns NULL when called, error 501 should appear and that's what I did in lookup's implementation. If the extension of the file is none of the ones mentioned in the pset's ...
user avatar
0 votes
1 answer
59 views

problem with strcmp in pset6 parse

I was always getting the same 405 error no matter what so I used the debugger and I found my problem but I don't know how to fix it. The problem is method equals GET\377\377\177 and methodget equals "...
user avatar
  • 44
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*...
user avatar
  • 23