Questions tagged [pset6]

The problem set for Week 7

Filter by
Sorted by
Tagged with
0
votes
1answer
83 views

Server.c Load function can read HTML but not images or PHP?

I'm not sure if what I did makes sense but here's the code for the load function: if (file != NULL) { char c; int counter = 0; while ((c = fgetc(file)) != EOF) { counter++; } ...
0
votes
1answer
38 views

What is the difference between int* and char* in context of my load function?

Please take a look at the codes (both correct and incorrect) first- incorrect code- char* buffer = malloc(*counter); char* ch = malloc(sizeof(char)); for (*ch=fgetc(file);*c != EOF;*ch=...
0
votes
1answer
353 views

pset6 receiving 404 error after first page

Hopefully this is the final problem with PSET6. I have completed all 4 functions and the program is running on the first try, meaning when I am visiting one of the pages, for example cat.jpg, the ...
0
votes
1answer
635 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
1answer
328 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
1answer
425 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
1answer
454 views

'301 Moved Permanently' - error

I'm getting the following errors when testing via curl: Terminal 1 curl -i http://localhost:8080/hello.php?q=Lucky HTTP/1.1 301 Moved Permanently Location: / Terminal 2 GET /hello.php?q=Lucky ...
0
votes
1answer
101 views

pset6 server.c not working properly

my server.c load and indexes functions are not working properly, and I'm not sure what's up. My parse and lookup functions pass all the tests. Any thoughts? bool load(FILE* file, BYTE** content, ...
0
votes
1answer
77 views

Two compact versions of my load function don't work, help

I've tried for about five days to finish the load function but now that I have two compact versions which don't work I don't have any idea what i am doing wrong. Code for the first load function: ...
0
votes
1answer
181 views

PSET6 Auto Grader

I submitted my solution to PSET6, but the autograder does not seem to evaluate the solution correctly. I have checked the solution using check50 and everything passed. I compared the staff solution ...
0
votes
1answer
453 views

Where are the dictionaries for speller?

When I run speller.c it says it could not load dictionary. I can't find the dictionaries anywhere in the appliance. Home directory only has jharvard in it and when I put gedit ~cs50/pset6/dictionaries/...
0
votes
1answer
30 views

pset6 can not return abs_path correctly

I tried to print the value of abs_path, it shows ok. But after running parse function in the main function(this line ---if (parse(line, abs_path, query)), I print the value and it turns to be null. ...
0
votes
1answer
177 views

pset6 problem loading jpg file

So far my program passes all but 2 of check50 server2: :( Requesting cat.jpg returns 200, image/jpeg, and correct image :( Requesting two files in a row (cat.html then cat.jpg) succeeds I think ...
0
votes
1answer
91 views

pset6 | Server.c | load and indexes doesn't work

I can't seem to find a problem in my load and indexes function. I need help. Thank you!! bool load(FILE* file, BYTE** content, size_t* length) { *content = NULL; *length = 0; BYTE temp; ...
0
votes
1answer
107 views

Pset6 server.c almost there

I spend a lot of time on this pset, and still got some errors which I can not figure out, so please help if you may. Here are errors cs50 checker sends me: :) server.c exists :) server compiles :) ...
0
votes
2answers
1k views

Could not load dictionary in cs50 pset6

I have written the load code for pset6 which compiles but when I execute speller.c it returns "Could not load dictionary". I have tried using a homemade dictionary on my machine and the dictionary at ...
0
votes
2answers
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 ...
0
votes
1answer
57 views

pset6 server2 load() fseek() return -1 [SOLVED]

I'm almost done with this one. However I have one more bug that I can't resolve. fseek is returning -1 only for some cases. errno's value is 29 after ftell, if that helps. check50 says: $ check50 ...
0
votes
1answer
54 views

Problem with Load in PSET6?

Getting a lot of errors in check2 - my paths seem to be fine but it's not returning the right files. In GDB I'm getting a 500 error when it returns... I feel like this is a pretty simple method, so ...

1
2