~ubuntu-branches/ubuntu/karmic/italc/karmic-updates

« back to all changes in this revision

Viewing changes to ica/x11/libvncserver/httpd.c

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Graber
  • Date: 2008-02-11 23:40:20 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20080211234020-o9fixmzxpa1ybhlq
Tags: upstream-1.0.6
Import upstream version 1.0.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
#include <tcpd.h>
60
60
#endif
61
61
 
 
62
#define connection_close
 
63
#ifndef connection_close
 
64
 
62
65
#define NOT_FOUND_STR "HTTP/1.0 404 Not found\r\n\r\n" \
63
66
    "<HEAD><TITLE>File Not Found</TITLE></HEAD>\n" \
64
67
    "<BODY><H1>File Not Found</H1></BODY>\n"
67
70
    "<HEAD><TITLE>Invalid Request</TITLE></HEAD>\n" \
68
71
    "<BODY><H1>Invalid request</H1></BODY>\n"
69
72
 
70
 
#if 1
71
73
#define OK_STR "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"
 
74
 
72
75
#else
 
76
 
 
77
#define NOT_FOUND_STR "HTTP/1.0 404 Not found\r\nConnection: close\r\n\r\n" \
 
78
    "<HEAD><TITLE>File Not Found</TITLE></HEAD>\n" \
 
79
    "<BODY><H1>File Not Found</H1></BODY>\n"
 
80
 
 
81
#define INVALID_REQUEST_STR "HTTP/1.0 400 Invalid Request\r\nConnection: close\r\n\r\n" \
 
82
    "<HEAD><TITLE>Invalid Request</TITLE></HEAD>\n" \
 
83
    "<BODY><H1>Invalid request</H1></BODY>\n"
 
84
 
73
85
#define OK_STR "HTTP/1.0 200 OK\r\nConnection: close\r\nContent-Type: text/html\r\n\r\n"
 
86
 
74
87
#endif
75
88
 
76
89
static void httpProcessInput(rfbScreenInfoPtr screen);
332
345
        return;
333
346
    }
334
347
 
335
 
    if (sscanf(buf, "GET %s HTTP/1.0", fname) != 1) {
 
348
    if (sscanf(buf, "GET %s HTTP/1.", fname) != 1) {
336
349
        rfbErr("httpd: couldn't parse GET line\n");
337
350
        httpCloseSock(rfbScreen);
338
351
        return;