|
ELinks 0.19.1
|
#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <limits.h>#include "elinks.h"#include "cache/cache.h"#include "config/options.h"#include "cookies/cookies.h"#include "intl/charsets.h"#include "intl/libintl.h"#include "main/module.h"#include "network/connection.h"#include "network/progress.h"#include "network/socket.h"#include "osdep/ascii.h"#include "osdep/osdep.h"#include "osdep/sysname.h"#include "protocol/auth/auth.h"#include "protocol/auth/digest.h"#include "protocol/curl/http.h"#include "protocol/date.h"#include "protocol/header.h"#include "protocol/http/blacklist.h"#include "protocol/http/codes.h"#include "protocol/http/http.h"#include "protocol/uri.h"#include "session/session.h"#include "terminal/terminal.h"#include "util/base64.h"#include "util/conv.h"#include "util/memory.h"#include "util/string.h"
Macros | |
| #define | HTTP_0_9(x) |
| #define | HTTP_1_0(x) |
| #define | HTTP_1_1(x) |
| #define | PRE_HTTP_1_0(x) |
| #define | PRE_HTTP_1_1(x) |
| #define | POST_HTTP_1_0(x) |
| #define | POST_HTTP_1_1(x) |
| #define | LEN_CHUNKED -2 /* == we get data in unknown number of chunks */ |
| #define | LEN_FINISHED 0 |
| #define | CHUNK_DATA_END -3 |
| #define | CHUNK_ZERO_SIZE -2 |
| #define | CHUNK_SIZE -1 |
| #define | IS_PROXY_URI(x) |
| #define | connection_is_https_proxy(conn) |
| #define | POST_BUFFER_SIZE 4096 |
Functions | |
| static void | done_http (struct module *mod) |
| static void | init_accept_charset (void) |
| char * | subst_user_agent (char *fmt, const char *version, char *sysname, char *termsize) |
| void | add_url_to_http_string (struct string *header, struct uri *uri, uri_component_T components) |
| static int | revstr2num (char *start, char *end, int *value) |
| static int | get_http_code (struct read_buffer *rb, int *code, struct http_version *version) |
| static int | check_http_server_bugs (struct uri *uri, struct http_connection_info *http, char *head) |
| static void | http_end_request (struct connection *conn, struct connection_state state, int notrunc) |
| static void | http_send_header (struct socket *) |
| void | http_protocol_handler (struct connection *conn) |
| void | proxy_protocol_handler (struct connection *conn) |
| static void | done_http_connection (struct connection *conn) |
| connection.done points to this function if connection.info points to a struct http_connection_info. | |
| struct http_connection_info * | init_http_connection_info (struct connection *conn, int major, int minor, int close) |
| static void | accept_encoding_header (struct string *header) |
| static void | send_more_post_data (struct socket *socket) |
| static char * | decompress_data (struct connection *conn, char *data, int len, int *new_len) |
| static int | is_line_in_buffer (struct read_buffer *rb) |
| static void | read_http_data (struct socket *socket, struct read_buffer *rb) |
| static void | read_more_http_data (struct connection *conn, struct read_buffer *rb, int already_got_anything) |
| static void | read_http_data_done (struct connection *conn) |
| static int | read_chunked_http_data (struct connection *conn, struct read_buffer *rb) |
| static int | read_normal_http_data (struct connection *conn, struct read_buffer *rb) |
| static int | get_header (struct read_buffer *rb) |
| static int | check_http_authentication (struct connection *conn, struct uri *uri, char *header, const char *header_field) |
| void | http_got_header (struct socket *socket, struct read_buffer *rb) |
Variables | |
| static struct auth_entry | proxy_auth |
| static char * | accept_charset = NULL |
| static union option_info | http_options [] |
| struct module | http_protocol_module |
| #define CHUNK_DATA_END -3 |
| #define CHUNK_SIZE -1 |
| #define CHUNK_ZERO_SIZE -2 |
| #define connection_is_https_proxy | ( | conn | ) |
| #define HTTP_0_9 | ( | x | ) |
| #define HTTP_1_0 | ( | x | ) |
| #define HTTP_1_1 | ( | x | ) |
| #define IS_PROXY_URI | ( | x | ) |
| #define LEN_CHUNKED -2 /* == we get data in unknown number of chunks */ |
| #define LEN_FINISHED 0 |
| #define POST_BUFFER_SIZE 4096 |
| #define POST_HTTP_1_0 | ( | x | ) |
| #define POST_HTTP_1_1 | ( | x | ) |
| #define PRE_HTTP_1_0 | ( | x | ) |
| #define PRE_HTTP_1_1 | ( | x | ) |
|
static |
| void add_url_to_http_string | ( | struct string * | header, |
| struct uri * | uri, | ||
| uri_component_T | components ) |
|
static |
|
static |
|
static |
|
static |
|
static |
connection.done points to this function if connection.info points to a struct http_connection_info.
|
static |
|
static |
|
static |
| void http_got_header | ( | struct socket * | socket, |
| struct read_buffer * | rb ) |
| void http_protocol_handler | ( | struct connection * | conn | ) |
|
static |
|
static |
| struct http_connection_info * init_http_connection_info | ( | struct connection * | conn, |
| int | major, | ||
| int | minor, | ||
| int | close ) |
|
static |
| void proxy_protocol_handler | ( | struct connection * | conn | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| char * subst_user_agent | ( | char * | fmt, |
| const char * | version, | ||
| char * | sysname, | ||
| char * | termsize ) |
|
static |
|
static |
| struct module http_protocol_module |
|
static |