✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.51
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/php80/usr/include/php/ext/swoole/thirdparty//multipart_parser.h
/* Based on node-formidable by Felix Geisendörfer
 * Igor Afonov - afonov@gmail.com - 2012
 * MIT License - http://www.opensource.org/licenses/mit-license.php
 * @link https://github.com/libcat/libcat/blob/develop/deps/multipart_parser
 */

#ifndef _multipart_parser_h
#define _multipart_parser_h

#ifdef __cplusplus
extern "C" {
#endif

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>

typedef struct multipart_parser multipart_parser;
typedef struct multipart_parser_settings multipart_parser_settings;
typedef struct multipart_parser_state multipart_parser_state;

typedef int (*multipart_data_cb)(multipart_parser *, const char *at, size_t length);
typedef int (*multipart_notify_cb)(multipart_parser *);

enum multipart_error {
    MPPE_OK = 0,
    MPPE_PAUSED,
    MPPE_UNKNOWN,
    MPPE_BOUNDARY_END_NO_CRLF,
    MPPE_BAD_START_BOUNDARY,
    MPPE_INVALID_HEADER_FIELD_CHAR,
    MPPE_INVALID_HEADER_VALUE_CHAR,
    MPPE_BAD_PART_END,
    MPPE_END_BOUNDARY_NO_DASH,
    MPPE_HEADER_VALUE_INCOMPLETE,
};

#define MPPE_ERROR -1

// from RFC2046
#define BOUNDARY_MAX_LEN 70

struct multipart_parser {
    /* private holder for callbacks */
    const multipart_parser_settings *settings;
    /* private internal index for matching boundary */
    size_t index;
    /* public error unexpected char index */
    size_t error_i;
    /* private boundary length + 2 ("--") */
    unsigned char boundary_length;
    FILE *fp;
    void *data;
    /* private FSM state */
    unsigned char state;
    /* public error reason */
    unsigned char error_reason;
    /* private boundary storage: "--" + boundary */
    char boundary[(2 + BOUNDARY_MAX_LEN) * 2 + 9];
    /* public error expected char */
    char error_expected;
    /* public error unexpected char */
    char error_unexpected;
};

struct multipart_parser_settings {
    /*
     * data callback called on header field coming
     * for example data is "Content-Type" with length 12
     */
    multipart_data_cb on_header_field;
    /*
     * data callback called on header value coming
     * for example data is "plain/text" with length 10
     */
    multipart_data_cb on_header_value;
    /*
     * data callback called on body data coming,
     * will be called repeatedly until data end
     */
    multipart_data_cb on_part_data;
    /*
     * before "--" boundary
     */
    multipart_notify_cb on_part_data_begin;
    /*
     * after all headers line "\r\n", before body
     */
    multipart_notify_cb on_headers_complete;
    /*
     * after body, before next "--" boundary
     */
    multipart_notify_cb on_part_data_end;
    /*
     * after last "--" boundary "--"
     */
    multipart_notify_cb on_body_end;
};

multipart_parser *multipart_parser_init(const char *boundary,
                                        size_t boundary_length,
                                        const multipart_parser_settings *settings);
void multipart_parser_free(multipart_parser *p);

/**
 * The multipart header must be complete, otherwise it will be parsed incorrectly
 */
ssize_t multipart_parser_execute(multipart_parser *p, const char *buf, size_t len);
int multipart_parser_error_msg(multipart_parser *p, char *buf, size_t len);

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
1 Apr 2025 7.08 AM
root / linksafe
0755
hiredis
--
1 Apr 2025 7.08 AM
root / linksafe
0755
nghttp2
--
1 Apr 2025 7.08 AM
root / linksafe
0755
multipart_parser.h
3.183 KB
12 Mar 2025 12.58 PM
root / linksafe
0644
swoole_http_parser.h
6.648 KB
12 Mar 2025 12.58 PM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF