A Checklist for Testing/Debugging CPSC 441 Assignment 1 1. Does your proxy work correctly when you send requests to it from the command line using "telnet IP port"? What do requests look like? What do responses look like? This approach is much simpler for initial testing than reconfiguring your browser all of the time. 2. Does your proxy work correctly when you send requests to it from the browser by changing the network settings? What do requests look like? What do responses look like? 3. Is your browser properly configured to talk to the correct IP address and port where the proxy is running? Are you sure? Can you double-check this? Is there NAT or a firewall that is blocking you? Does Wireshark show that the correct packets are going back and forth on the network? 4. Is your proxy sending the HTTP request to the correct server? What is the IP you are using? What is the port you are using? How did you figure out the IP address from the server name? Did this step work correctly? What does Wireshark show for the IP address and TCP port number on the packet? Does it work if you hardcode the IP address statically? 5. Does it fail on the first request, or on subsequent ones? Does the 'server-like' (left) side of your proxy have a big loop that keeps receiving subsequent requests from the browser on the very same socket (created outside the loop), or are you creating a new socket each time? If the latter, is it on the same port, or on a different one? 6. Are you using HTTP/1.0 or HTTP/1.1? What is the browser using? Are you changing it? What is the server using? Are you changing it at all? Is the server doing a forced close on the connection after each object? If so, are you forwarding this header line to the client, or are you removing it before sending it back to the browser? 7. Are the requests from the browser multi-line requests with many different header fields, or just a single line? If multi-line, are you reading in and sending all of the request header lines properly? How big was the request? What did the return value from recv() say? How many bytes did you send to the server? What did the return value from the send() system call say? 8. Do your HTTP requests have the extra blank line at the end? Are you sure? How do you know? 9. What is the HTTP response code that came back? Is it one that makes sense? Does it contain any data? How do you know? 10. What does the server response look like? How big was it? Did you get all of the header? Did you get all of the data? Was there any data at all? Was there a blank line between the header and the data? 11. Did you send all of the response back to the browser? How do you know? How big was it? What was the return value from the send system call? 12. Was the HTTP response from the server actually larger than the buffer size you were using for the receive? Do you need another loop to keep receiving all the data before you send it back to the browser? Is your buffer big enough for this? 13. Are there requests other than 'GET' that are messing you up? Are these coming from your testing cases, or are they coming from other active tabs in your browser, such as Office 365? You probably don't want other things running in your browser while you are in proxy mode. You don't need to tamper with requests other than GET. Probably the safest thing to do is to send them to their intended server untouched, and to send the response back to the browser untouched. Or just ignore them, and try to minimize the amount of time your browser stays in the proxy configuration mode. 14. Is the server part of your proxy a blocking server (single process handling all incoming requests one by one) or a non-blocking server (spawns a new child process for each incoming request)? Does your proxy work properly on the simple test pages? Does your proxy work on large and complicated Web pages? 15. Do you check the content length header to determine the object size? Is your buffer big enough to handle it? Are you sending and receiving the right number of bytes? Did you count the HTTP (request or response) header size in what you are sending and receiving? 16. Does your proxy properly check for the content type? Is it leaving images alone? Are you trying to do string manipulation on binary data? Are you trying to print binary data on the screen in your debugging? You may not want to do this if it messes up your screen.