ELinks 0.18.0
uri Struct Reference

#include <uri.h>

Collaboration diagram for uri:

Data Fields

char * string
 The start of the URI (and thus start of the protocol string).
 
protocol_T protocol
 
int ip_family
 
char * user
 
char * password
 
char * host
 
char * port
 
char * data
 
char * fragment
 
char * post
 POST data attached to the URI.
 
unsigned int protocollen:16
 
unsigned int userlen:16
 
unsigned int passwordlen:16
 
unsigned int hostlen:16
 
unsigned int portlen:8
 
unsigned int datalen
 
unsigned int fragmentlen:16
 
unsigned int ipv6:1
 
unsigned int form:1
 
struct elinks_object object
 

Field Documentation

◆ data

char* uri::data

◆ datalen

unsigned int uri::datalen

◆ form

unsigned int uri::form

◆ fragment

char* uri::fragment

◆ fragmentlen

unsigned int uri::fragmentlen

◆ host

char* uri::host

◆ hostlen

unsigned int uri::hostlen

◆ ip_family

int uri::ip_family

◆ ipv6

unsigned int uri::ipv6

◆ object

struct elinks_object uri::object

◆ password

char* uri::password

◆ passwordlen

unsigned int uri::passwordlen

◆ port

char* uri::port

◆ portlen

unsigned int uri::portlen

◆ post

char* uri::post

POST data attached to the URI.

If uri.string contains a POST_CHAR, then post points to the following character. Otherwise NULL. The syntax of the POST data is:

[content-type '\n'] (hexadecimal-byte | FILE_CHAR file-name FILE_CHAR)*

  • If content-type is present, ELinks sends "Content-Type: ", content-type, and CRLF in the head of the POST request.
  • Each hexadecimal-byte is a byte for the body of the POST request. It is encoded as two lower-case hexadecimal digits, most significant first. For example, "0a" for ASCII_LF.
  • file-name is the name of a file that ELinks should send to the server. It is in the charset accepted by open(), and some characters (especially FILE_CHAR) are percent-encoded.

◆ protocol

protocol_T uri::protocol

◆ protocollen

unsigned int uri::protocollen

◆ string

char* uri::string

The start of the URI (and thus start of the protocol string).

The format of the whole string is like: "http6://elinks.cz/dir/file?query#frag" POST_CHAR post_data "\0"

The post_data is not really part of the URI but ELinks keeps it in the same string and can then distinguish between cache entries for different POST requests. See uri.post for its syntax.

◆ user

char* uri::user

◆ userlen

unsigned int uri::userlen

The documentation for this struct was generated from the following file: