This following is a list of the possible reasons why your proxy could not pass the tests. Hope it will be helpful to you.
If your programs fails any of the tests, don't panic. Recompile the test-webproxy with DEBUG_WEBPROXY defined to 1 and run your webproxy in gdb for debugging...
Test Phase 1: test if cachable pages are cached...This test is to check if you have implemented any caching scheme at all. In the test-webproxy program, the server keeps track of which of the cachable pages have been accessed before and denies access to them the second time. Thus if you have caching in your proxy, all the clients will be able to succeed in getting the cachable pages (first time from the server, second time onwards from your proxy).
Warning: Since the http responses from the server are randomly generated, you need to restart your webproxy every time you run this test if you have running webproxy manually in gdb.
Test Phase 2: test if non-cachable pages are NOT cached...This test is to check if your cache manager caches anything that's not allowed to be cached. In the test-webproxy program, the server randomly changes the responses to a particular URL (if the type of response associated with the URL is not cachable). The client always checks the response it got from the proxy with the actual response data in the server. Therefore, if your proxy caches anything non-cachable, the response the client got will be different from the server and you will get the following error message:
http response (#num) different from the server offset...Specially, if (#num) is: