Questions tagged [server]

Questions about server.c in pset6.

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

Debugging Webserver in C

I have an error in my server.c file for PSET6 but have no idea how to find it. I am trying to use GDB and it does not seem to be very useful. I would love some help learning how to better debug this ...
0
votes
1answer
180 views

pset 6 server - Load produces inconsistent results

I'm really confused about what is wrong with my code as load works for certain files but not others and the reading of the file isn't something that is altered in any of the functions we're tasked ...
0
votes
1answer
323 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 ...
1
vote
1answer
381 views

my server pset throws up "505 HTTP Version Not Supported" but i think it should not

Am done with pset6 but want to test if I implemented the server correctly but when I type in the URL (e.g: 192.#.#.#:port#/cat.jpg) into the browser as specified by David, I get the following error "...
0
votes
1answer
2k views

pset6 | Server.c | issue with load and indexes

I am currently working on server.c in pset 6. I have completed all the four functions and the first check50 gives all green smilies indicating that lookup and parse function seems to be working fine. ...
1
vote
1answer
373 views

pset6: /hello.php?name=david shows up in URL but hello.html page content loads

Currently working on pset6 server.c. All of my pages load properly except for one thing: when I submit a name in the text box from hello.html, the query properly shows up in the URL, but the hello....
0
votes
1answer
1k views

Pset 6 Web Server

This isn't a specific programming question, but having watched and re-watched edx lectures in weeks 6, 7 and 8, I am still completely overwhelmed and confused by pset6 "web server". I've read through ...
0
votes
1answer
162 views

Pset6, getting error: *** Error in `/home/ubuntu/workspace/pset6/server': free(): invalid pointer: 0x00007fffffff9dc0 ***

When running server.c, and requesting a site, I get this output Using /home/ubuntu/workspace/pset6/public for server's root ...
0
votes
2answers
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
1answer
261 views

pset6: what does check50 “TODO” error mean?

When I run ./server, it seems all working good. All files in root been opend correctly. But when I checking my code with Check50, it show me errors "TODO". It can be seen in the screenshot. What does ...
0
votes
1answer
314 views

PSET6 - No Data Received AND No Errors

This is the very last thing I seem to have to fix here. Telnet and GDB are returning no errors, but when I try to use my server.c in Chrome, I don't get the requested page. Instead, I get an error on ...
0
votes
1answer
123 views

realloc and length in load(), server.c

I need help with load() in server.c. This is a follow-up to the other question, except now I'll post the updated code and make it a bit more specific. When I tested the server after implemented ...
1
vote
1answer
150 views

PSET7: web server permissions problem

Just started pset7 and can't get the web server to load. I've read about this all over the place but can't get anything to work as of yet. Now I've resorted to wiping the whole workspace clean (after ...
0
votes
1answer
1k views

Help needed for CS50 IDE flask server

Please help as I have landed into a trouble with my flask server for pset8/mashup. Per the spec within mashup/ I execute pip install --user -r requirements.txt and then in a terminal window I execute ...
0
votes
0answers
245 views

Guys getting problem with cat.exe

Hey friends thakyou for your help in advance I am having problem with my parse and lookup function. check50 is returning all fine except this :disappointed: Requesting cat.exe returns error code 501 ...
0
votes
1answer
257 views

Pset6 - Server.c gives me 505 error (HTTP Version Not Supported)

When trying to access cat.html in pset6 on my local host, I get a 505: HTTP Version Not Supported error in both the browser and the terminal where my server is running. According to my server.c code, ...
0
votes
2answers
523 views

Pset6 Undefined index: name in /home/jharvard/Dropbox/pset6/public/hello.php on line 8

I'm almost through the end of debugging my Pset 6 (Server) code. The server now implements cat.jpg and cat.html properly, but I'm still facing trouble when I try to insert anything into hello.html. I ...
1
vote
1answer
75 views

Pset6 Server 403 Error, problem with path

I passed the first check50 for Pset6 but still can't seem to get my server working after implementing indexes and load. I've been getting 403 errors whenever I request my homepage, as well as an ...
0
votes
2answers
602 views

Variable optimized out eventhough it will be used later

When trying to debug my implementation of server.c, asking gdb to print out the variable line results in a <optimized out>. (gdb) p line (gdb) <optimized out> After doing a bit of ...
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
632 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
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
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
106 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 :) ...