PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - main - php_content_types.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 12 13 92.3 %
Date: 2014-08-04 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 5                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1997-2014 The PHP Group                                |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 3.01 of the PHP license,      |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.php.net/license/3_01.txt                                  |
      11             :    | If you did not receive a copy of the PHP license and are unable to   |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@php.net so we can mail you a copy immediately.               |
      14             :    +----------------------------------------------------------------------+
      15             :    | Author:                                                              |
      16             :    +----------------------------------------------------------------------+
      17             : */
      18             : 
      19             : /* $Id$ */
      20             : 
      21             : #include "php.h"
      22             : #include "SAPI.h"
      23             : #include "rfc1867.h"
      24             : 
      25             : #include "php_content_types.h"
      26             : 
      27             : /* {{{ php_post_entries[]
      28             :  */
      29             : static sapi_post_entry php_post_entries[] = {
      30             :         { DEFAULT_POST_CONTENT_TYPE, sizeof(DEFAULT_POST_CONTENT_TYPE)-1, sapi_read_standard_form_data, php_std_post_handler },
      31             :         { MULTIPART_CONTENT_TYPE,    sizeof(MULTIPART_CONTENT_TYPE)-1,    NULL,                         rfc1867_post_handler },
      32             :         { NULL, 0, NULL, NULL }
      33             : };
      34             : /* }}} */
      35             : 
      36             : /* {{{ SAPI_POST_READER_FUNC
      37             :  */
      38          73 : SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
      39             : {
      40          73 :         if (!strcmp(SG(request_info).request_method, "POST")) {
      41          73 :                 if (NULL == SG(request_info).post_entry) {
      42             :                         /* no post handler registered, so we just swallow the data */
      43           0 :                         sapi_read_standard_form_data(TSRMLS_C);
      44             :                 }
      45             :         }
      46          73 : }
      47             : /* }}} */
      48             : 
      49             : /* {{{ php_startup_sapi_content_types
      50             :  */
      51       21265 : int php_startup_sapi_content_types(TSRMLS_D)
      52             : {
      53       21265 :         sapi_register_default_post_reader(php_default_post_reader TSRMLS_CC);
      54       21265 :         sapi_register_treat_data(php_default_treat_data TSRMLS_CC);
      55       21265 :         sapi_register_input_filter(php_default_input_filter, NULL TSRMLS_CC);
      56       21265 :         return SUCCESS;
      57             : }
      58             : /* }}} */
      59             : 
      60             : /* {{{ php_setup_sapi_content_types
      61             :  */
      62       21265 : int php_setup_sapi_content_types(TSRMLS_D)
      63             : {
      64       21265 :         sapi_register_post_entries(php_post_entries TSRMLS_CC);
      65             : 
      66       21265 :         return SUCCESS;
      67             : }
      68             : /* }}} */
      69             : 
      70             : /*
      71             :  * Local variables:
      72             :  * tab-width: 4
      73             :  * c-basic-offset: 4
      74             :  * End:
      75             :  * vim600: sw=4 ts=4 fdm=marker
      76             :  * vim<600: sw=4 ts=4
      77             :  */

Generated by: LCOV version 1.10

Generated at Mon, 04 Aug 2014 15:49:19 +0000 (28 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.