⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http_hdrs.h

📁 完整实现http协议源代码(WINDOWS或LINUX平台均可移植使用),我在VC++上(不调用WINDOWS的HTTP的API)可实现XML文件下载等.
💻 H
字号:
/* * http_hdrs.h -- This file contains declarations for http headers * Created: Christopher Blizzard <blizzard@appliedtheory.com>, 3-Aug-1998 * * Copyright (C) 1998 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */#ifndef HTTP_HDRS_H#define HTTP_HDRS_H#include "ghttp_constants.h"/* the list of known headers */extern const char *http_hdr_known_list[];/* a header list */#define HTTP_HDRS_MAX 256typedef struct http_hdr_list_tag{  char *header[HTTP_HDRS_MAX];  char *value[HTTP_HDRS_MAX];} http_hdr_list;/* functions dealing with headers *//* check to see if the library knows about the header */const char *http_hdr_is_known(const char *a_hdr);/* create a new list */http_hdr_list *http_hdr_list_new(void);/* destroy a list */voidhttp_hdr_list_destroy(http_hdr_list *a_list);/* set a value in a list */inthttp_hdr_set_value(http_hdr_list *a_list,		   const char *a_name,		   const char *a_val);/* set the value in a list from a range, not a NTS */inthttp_hdr_set_value_no_nts(http_hdr_list *a_list,			  const char *a_name_start,			  int a_name_len,			  const char *a_val_start,			  int a_val_len);/* get a copy of a value in a list */char *http_hdr_get_value(http_hdr_list *a_list,		   const char *a_name);/* get a copy of the headers in a list */inthttp_hdr_get_headers(http_hdr_list *a_list,		     char ***a_names,		     int *a_num_names);/* clear a header in a list */inthttp_hdr_clear_value(http_hdr_list *a_list,		     const char *a_name);#endif /* HTTP_HDRS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -