Ignore:
Timestamp:
May 8, 2009, 8:52:12 PM (13 years ago)
Author:
charles
Message:

(trunk libT) #2030: revert false alarm r8361 as per this suggestion http://trac.transmissionbt.com/ticket/2030#comment:45

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rpc-server.c

    r8364 r8368  
    336336        content = tr_loadFile( filename, &content_len );
    337337
    338         if( content )
     338        if( errno )
     339        {
     340            char * tmp = tr_strdup_printf( "%s (%s)", filename, tr_strerror( errno ) );
     341            send_simple_response( req, HTTP_NOTFOUND, tmp );
     342            tr_free( tmp );
     343        }
     344        else
    339345        {
    340346            struct evbuffer * out;
     
    351357            tr_releaseBuffer( out );
    352358            tr_free( content );
    353         }
    354         else
    355         {
    356             char * tmp = tr_strdup_printf( "%s (%s)", filename, tr_strerror( errno ) );
    357             send_simple_response( req, HTTP_NOTFOUND, tmp );
    358             tr_free( tmp );
    359359        }
    360360    }
     
    584584                "<a href=\"http://en.wikipedia.org/wiki/Cross-site_request_forgery\">CSRF</a>"
    585585                " attacks more difficult.</p>",
    586                 TR_RPC_SESSION_ID_HEADER, sessionId,
    587                 TR_RPC_SESSION_ID_HEADER );
     586                TR_RPC_SESSION_ID_HEADER, sessionId );
    588587            evhttp_add_header( req->output_headers, TR_RPC_SESSION_ID_HEADER, sessionId );
    589588            send_simple_response( req, 409, tmp );
Note: See TracChangeset for help on using the changeset viewer.