~ubuntu-branches/ubuntu/hardy/apache2/hardy-proposed

« back to all changes in this revision

Viewing changes to modules/proxy/mod_proxy_ftp.c

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Fritsch
  • Date: 2008-01-17 20:27:56 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: james.westby@ubuntu.com-20080117202756-hv38rjknhwa2ilwi
Tags: upstream-2.2.8
ImportĀ upstreamĀ versionĀ 2.2.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
517
517
            }
518
518
 
519
519
            filename = strrchr(ctx->buffer, ' ');
 
520
            if (filename == NULL) {
 
521
                /* Line is broken.  Ignore it. */
 
522
                ap_log_error(APLOG_MARK, APLOG_WARNING, 0, r->server,
 
523
                             "proxy_ftp: could not parse line %s", ctx->buffer);
 
524
                /* erase buffer for next time around */
 
525
                ctx->buffer[0] = 0;
 
526
                continue;  /* while state is BODY */
 
527
            }
520
528
            *(filename++) = '\0';
521
529
 
522
530
            /* handle filenames with spaces in 'em */
1682
1690
 
1683
1691
    /* set content-type */
1684
1692
    if (dirlisting) {
1685
 
        ap_set_content_type(r, "text/html");
 
1693
        proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config,
 
1694
                                                     &proxy_module);
 
1695
 
 
1696
        ap_set_content_type(r, apr_pstrcat(p, "text/html;charset=",
 
1697
                                           dconf->ftp_directory_charset ?
 
1698
                                           dconf->ftp_directory_charset :
 
1699
                                           "ISO-8859-1",  NULL));
1686
1700
    }
1687
1701
    else {
1688
1702
        if (r->content_type) {