Annotation of parser3/src/types/pa_vrequest.C, revision 1.2

1.2     ! paf         1: /** @file
        !             2:        Parser: request class.
        !             3: 
1.1       paf         4:        Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)
1.2     ! paf         5: 
1.1       paf         6:        Author: Alexander Petrosyan <paf@design.ru>(http://design.ru/paf)
                      7: 
1.2     ! paf         8:        $Id: pa_vrequest.C,v 1.1 2001/03/16 12:30:26 paf Exp $
1.1       paf         9: */
                     10: 
                     11: #include "pa_vrequest.h"
                     12: #include "pa_request.h"
                     13: 
                     14: // request: CLASS,BASE,method,field
                     15: Value *VRequest::get_element(const String& aname) {
                     16:        // $CLASS,$BASE,$method
1.2     ! paf        17:        if(Value *result=VStateless_object::get_element(aname))
1.1       paf        18:                return result;
                     19:        
                     20:        // $query $uri 
                     21:        const char *cstr=0;
                     22:        if(aname=="query")
                     23:                cstr=frequest.info.query_string;
                     24:        if(aname=="uri")
                     25:                cstr=frequest.info.uri;
                     26:        if(!cstr)
                     27:                return 0;
                     28:        
                     29:        String& string=*NEW String(pool());
                     30:        string.APPEND_TAINTED(cstr, 0, "request", 0);
                     31:        return NEW VString(string);
                     32: }
                     33: 

E-mail: