~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy

« back to all changes in this revision

Viewing changes to xs/Apache/Response/Apache__Response.h

  • Committer: Bazaar Package Importer
  • Author(s): Andres Salomon
  • Date: 2005-08-12 01:40:38 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050812014038-gjigefs55pqx4qc8
Tags: 2.0.1-3
Grr.  Really include perl.conf file; it got lost due to diff not
wanting to add an empty file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2001-2004 The Apache Software Foundation
2
 
 *
3
 
 * Licensed under the Apache License, Version 2.0 (the "License");
4
 
 * you may not use this file except in compliance with the License.
5
 
 * You may obtain a copy of the License at
6
 
 *
7
 
 *     http://www.apache.org/licenses/LICENSE-2.0
8
 
 *
9
 
 * Unless required by applicable law or agreed to in writing, software
10
 
 * distributed under the License is distributed on an "AS IS" BASIS,
11
 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
 
 * See the License for the specific language governing permissions and
13
 
 * limitations under the License.
14
 
 */
15
 
 
16
 
/* XXX: this should probably named $r->cgi_header_parse
17
 
 * and send_cgi_header an alias in Apache::compat
18
 
 */
19
 
#define mpxs_Apache__RequestRec_send_cgi_header(r, sv) \
20
 
{ \
21
 
    MP_dRCFG; \
22
 
    STRLEN len; \
23
 
    const char *bodytext; \
24
 
    MP_CGI_HEADER_PARSER_OFF(rcfg); \
25
 
    SvPV_force(sv, len);            \
26
 
    modperl_cgi_header_parse(r, SvPVX(sv), (apr_size_t*)&len, &bodytext); \
27
 
    if (len) {\
28
 
        MP_CHECK_WBUCKET_INIT("$r->send_cgi_header"); \
29
 
        modperl_wbucket_write(aTHX_ rcfg->wbucket, bodytext, &len); \
30
 
    } \
31
 
}
32
 
 
33
 
static MP_INLINE void
34
 
mpxs_Apache__RequestRec_set_last_modified(request_rec *r, apr_time_t mtime)
35
 
{
36
 
    if (mtime) {
37
 
        ap_update_mtime(r, mtime);
38
 
    }
39
 
    ap_set_last_modified(r);
40
 
}