/[monit]/monit/http/processor.c
ViewVC logotype

Diff of /monit/http/processor.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.51 by martinp, Sat Feb 12 23:46:25 2005 UTC revision 1.52 by martinp, Sun Feb 13 20:07:13 2005 UTC
# Line 251  void out_print(HttpResponse res, const c Line 251  void out_print(HttpResponse res, const c
251   * @param value Header key value   * @param value Header key value
252   */   */
253  void set_header(HttpResponse res, const char *name, const char *value) {  void set_header(HttpResponse res, const char *name, const char *value) {
254    HttpHeader h;    HttpHeader h= NULL;
255    
256    ASSERT(res);    ASSERT(res);
257    ASSERT(name);    ASSERT(name);
258    
259    NEW(h);    NEW(h);
260    h->name= xstrdup(name);    h->name= xstrdup(name);
261    h->value= xstrdup(value);    h->value= xstrdup(value);
# Line 535  static void send_response(HttpResponse r Line 536  static void send_response(HttpResponse r
536   * Returns a new HttpRequest object wrapping the client request   * Returns a new HttpRequest object wrapping the client request
537   */   */
538  static HttpRequest create_HttpRequest(Socket_T S) {  static HttpRequest create_HttpRequest(Socket_T S) {
539    HttpRequest req;    HttpRequest req= NULL;
540    char url[REQ_STRLEN];    char url[REQ_STRLEN];
541    char line[REQ_STRLEN];    char line[REQ_STRLEN];
542    char protocol[STRLEN];    char protocol[STRLEN];
# Line 575  static HttpRequest create_HttpRequest(So Line 576  static HttpRequest create_HttpRequest(So
576   * the set_XXX methods to change the object.   * the set_XXX methods to change the object.
577   */   */
578  static HttpResponse create_HttpResponse(Socket_T S) {  static HttpResponse create_HttpResponse(Socket_T S) {
579    HttpResponse res;    HttpResponse res= NULL;
580    
581    NEW(res);    NEW(res);
582    res->S= S;    res->S= S;
# Line 596  static HttpResponse create_HttpResponse( Line 597  static HttpResponse create_HttpResponse(
597  static void create_headers(HttpRequest req) {  static void create_headers(HttpRequest req) {
598    Socket_T S;    Socket_T S;
599    char *value;    char *value;
600    HttpHeader header;    HttpHeader header= NULL;
601    char line[REQ_STRLEN];    char line[REQ_STRLEN];
602    
603    S= req->S;    S= req->S;
# Line 847  static HttpParameter parse_parameters(ch Line 848  static HttpParameter parse_parameters(ch
848      if(token==KEY)      if(token==KEY)
849        key= value;        key= value;
850      else if(token==VALUE) {      else if(token==VALUE) {
851        HttpParameter p;        HttpParameter p= NULL;
852        if(!key) goto error;        if(!key) goto error;
853        NEW(p);        NEW(p);
854        p->name= key;        p->name= key;

Legend:
Removed from v.1.51  
changed lines
  Added in v.1.52

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26