URL_Struct

This document describes the URL_Struct in Netlib for the 331 release. The URL_Struct is the single mechanism of storing URL specific data and gets used at several places in the source. This includes everything from user information to header fields related to a specific connection in process.

There are a significant set of items in the URL_Struct that don't belong to this struct, or are obsolete, or redundant. Hopefully things will improve in the new world order.

Any questions/comments/corrections- mail me.


Type Name Description
XP_Bool* add_crlf For files_to_post- whether or not to convert line endings to CRLF.
char* address The URL part.
NET_AllHeaders all_headers All HTTP headers.
char* authenticate Authentication scheme.
uint32 auto_scroll Set this if you want the window to autoscroll to the bottom at all times The value represents the number of lines to buffer.
char* boundary Multipart message boundary.
char* cache_file If not null- it contains the local filename of the cached copy.
struct CERTCertificateStr* certificate Server's certificate.
char* charset Charset of the data.
char* content_encoding Encoding of the incoming data.
int32 content_length Response data length.
char* content_name Passed in name for the incoming object.
char* content_type Content Type of the incoming data.
char* destination The other URL for COPY and MOVE methods.
char* error_msg Error message- explaing what went wrong.
char* etag HTTP/1.1 Etag.
time_t expires A computed value for the equivalent of "Expires" header.
void* fe_data Front end specific data.
char** files_to_post Zero terminated array of files (as char*) that need to be posted.
NET_ReloadMethod force_reload Normal or Super reload. Corresponds to Reload or Shift-Reload.
uint32 high_range See also low_range. These range tags represent the byte offsets that this URL contains. If high_range is non-zero then the data in the response represents just a subset of the URL.
int history_num Add this URL to history or not. Default = 1 (true)
char* http_headers HTTP Headers passed to support proxying.
char* IPAddressString A resolved IPAddress for the hostname in the address.
char* key_cipher Security specific information.
char* key_issuer Obsolete stuff.
int key_secret_size Security specific information.
int key_size Security specific information.
char* key_subject Obsolete stuff.
time_t last_modified Value of "Last Modified" HTTP header.
uint32 low_range Also see high_range. These range tags represent the byte offsets that this URL contains. If high_range is non-zero then the data in the response represents just a subset of the URL.
net_Memory_CacheObject* memory_copy If not null, it contains the info for a memory copy of the data.
int method The method for this URL. GET, POST, etc.
void* ncapi_data URL specific NCAPI data- only on Windows/OS2.
char* origin_url Origin referer of a JS URL.
void* owner_data Private data for whoever created this URL_Struct.
int owner_id Unique id for each library.
char* page_services_url A URL that is associated with the Page Services feature.
char* password The associated Password.
uint32 position For plugin streams.
int32 position_tag Tag number of Layout position.
char* post_data Data to be posted. Used in POST requests.
int32 post_data_size Size of post_data
char* post_headers Additional headers like "Content-Length" for a POST request.
char** post_to Only meaningful if files_to_post is set. If not null, post_to is a NULL-terminated array of the URLs to post the files in files_to_post to. If NULL, files_to_post along with address(a directory) will be used to decide where to post the files (like befor
Net_GetURLExitFun* pre_exit_fn This function, if set gets called just before exiting NET_GetURL
URLLoadPriority priority The load priority- which decides the order in which this URL is retrieved from the net.
char* protection_template Name of the server auth. template.
char* proxy_authenticate Proxy authentication scheme.
char* range_headers Requested range in bytes.
int32 real_content_length Real content length of a partial file. Typically in an HTTP 206 response.
struct CERTCertificateStr* redirecting_cert Redirecting server's certificate.
char* redirecting_url The "Location" of the redirecting URL.
int ref_count Reference counting.
char* referer The Referer field in an HTTP request. The URL document that links this one.
uint32 refresh Refresh interval.
char* refresh_url URL to refresh to.
ExtCacheDBInfo* SARCache A pointer to the external cache where this item is located.
SHIST_SavedData savedData Layout data.
void* sec_private Security library's private information.
int security_on Is Security on.
time_t server_date Value of "Server" HTTP header.
int server_status Response code returned by the server.
char* transfer_encoding First encoding on incoming data.
char* username The login username associated with a URL.
Chrome* window_chrome Identifies the window characterstics.
char* window_target Named window support.
char* wysiwyg_url URL for WYSIWYG printing/saving.
char* x_mac_creator Some Mac specific types. Currently only used in mail/news.
char* x_mac_type Same as above.

Besides these, there are also some state flags in the URL_Struct. These are all of PRPackedBool type. Most of these are self-explanatory-
address_modified
can_reuse_connection
dontAllowDiffHostRedirect
dont_cache
ext_cache_file
internal_url
intr_on_load
is_active
is_binary
is_directory
is_netsite
load_background
mailto_post
must_cache
post_data_is_file
preset_content_type
resize_reload
server_can_do_byteranges
server_can_do_restart
use_local_copy


Last modified on-
Comments/Corrections - Gagan