Home
last modified time | relevance | path

Searched refs:tmp_buf (Results 1 – 24 of 24) sorted by relevance

/mOS-networking-stack/samples/lighttpd-1.4.32/src/
H A Dmod_evhost.c21 buffer *tmp_buf; member
32 p->tmp_buf = buffer_init(); in INIT_FUNC()
67 buffer_free(p->tmp_buf); in FREE_FUNC()
282 buffer_reset(p->tmp_buf); in mod_evhost_uri_handler()
291 buffer_append_string_len(p->tmp_buf,CONST_STR_LEN("%")); in mod_evhost_uri_handler()
304 buffer_append_string_buffer(p->tmp_buf,ds->value); in mod_evhost_uri_handler()
310 buffer_append_string_buffer(p->tmp_buf,p->conf.path_pieces[i]); in mod_evhost_uri_handler()
314 BUFFER_APPEND_SLASH(p->tmp_buf); in mod_evhost_uri_handler()
318 if (HANDLER_ERROR == stat_cache_get_entry(srv, con, p->tmp_buf, &sce)) { in mod_evhost_uri_handler()
319 log_error_write(srv, __FILE__, __LINE__, "sb", strerror(errno), p->tmp_buf); in mod_evhost_uri_handler()
[all …]
H A Dplugin.c138 buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("/")); in plugins_load()
139 buffer_append_string(srv->tmp_buf, modules); in plugins_load()
141 buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN(".dll")); in plugins_load()
143 buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN(".so")); in plugins_load()
148 if (NULL == (p->lib = LoadLibrary(srv->tmp_buf->ptr))) { in plugins_load()
160 lpMsgBuf, srv->tmp_buf); in plugins_load()
170 srv->tmp_buf, dlerror()); in plugins_load()
178 buffer_reset(srv->tmp_buf); in plugins_load()
179 buffer_copy_string(srv->tmp_buf, modules); in plugins_load()
183 init = GetProcAddress(p->lib, srv->tmp_buf->ptr); in plugins_load()
[all …]
H A Dmod_trigger_b4_dl.c61 buffer *tmp_buf; member
74 p->tmp_buf = buffer_init(); in INIT_FUNC()
118 buffer_free(p->tmp_buf); in FREE_FUNC()
390 buffer_append_string(p->tmp_buf, remote_ip); in URIHANDLER_FUNC()
392 for (i = 0; i < p->tmp_buf->used - 1; i++) { in URIHANDLER_FUNC()
393 if (p->tmp_buf->ptr[i] == ' ') p->tmp_buf->ptr[i] = '-'; in URIHANDLER_FUNC()
401 CONST_BUF_LEN(p->tmp_buf), in URIHANDLER_FUNC()
477 buffer_append_string(p->tmp_buf, remote_ip); in URIHANDLER_FUNC()
480 if (p->tmp_buf->ptr[i] == ' ') p->tmp_buf->ptr[i] = '-'; in URIHANDLER_FUNC()
494 CONST_BUF_LEN(p->tmp_buf) in URIHANDLER_FUNC()
[all …]
H A Dmod_indexfile.c23 buffer *tmp_buf; member
36 p->tmp_buf = buffer_init(); in INIT_FUNC()
63 buffer_free(p->tmp_buf); in FREE_FUNC()
161 buffer_copy_string_buffer(p->tmp_buf, con->physical.doc_root); in URIHANDLER_FUNC()
163 buffer_copy_string_buffer(p->tmp_buf, con->physical.path); in URIHANDLER_FUNC()
165 buffer_append_string_buffer(p->tmp_buf, ds->value); in URIHANDLER_FUNC()
167 if (HANDLER_ERROR == stat_cache_get_entry(srv, con, p->tmp_buf, &sce)) { in URIHANDLER_FUNC()
195 buffer_copy_string_buffer(con->physical.path, p->tmp_buf); in URIHANDLER_FUNC()
H A Dmod_mysql_vhost.c55 buffer *tmp_buf; member
76 p->tmp_buf = buffer_init(); in INIT_FUNC()
114 buffer_free(p->tmp_buf); in SERVER_FUNC()
363 buffer_copy_string_buffer(p->tmp_buf, p->conf.mysql_pre);
365 buffer_append_string_buffer(p->tmp_buf, con->uri.authority);
366 buffer_append_string_buffer(p->tmp_buf, p->conf.mysql_post);
368 if (mysql_query(p->conf.mysql, p->tmp_buf->ptr)) {
385 buffer_copy_string(p->tmp_buf, row[0]);
386 BUFFER_APPEND_SLASH(p->tmp_buf);
388 if (HANDLER_ERROR == stat_cache_get_entry(srv, con, p->tmp_buf, &sce)) {
[all …]
H A Dmod_ssi.c177 buffer_reset(srv->tmp_buf); in ssi_env_add_request_headers()
186 srv->tmp_buf->used--; in ssi_env_add_request_headers()
199 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in ssi_env_add_request_headers()
201 srv->tmp_buf->ptr[srv->tmp_buf->used] = '\0'; in ssi_env_add_request_headers()
215 buffer_reset(srv->tmp_buf); in ssi_env_add_request_headers()
227 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in ssi_env_add_request_headers()
229 srv->tmp_buf->ptr[srv->tmp_buf->used] = '\0'; in ssi_env_add_request_headers()
565 buffer_copy_string(srv->tmp_buf, file_path); in process_ssi_stmt()
566 buffer_urldecode_path(srv->tmp_buf); in process_ssi_stmt()
567 buffer_path_simplify(srv->tmp_buf, srv->tmp_buf); in process_ssi_stmt()
[all …]
H A Dmod_auth.c35 p->tmp_buf = buffer_init(); in INIT_FUNC()
52 buffer_free(p->tmp_buf); in FREE_FUNC()
284 buffer_copy_string_len(p->tmp_buf, CONST_STR_LEN("Basic realm=\"")); in mod_auth_uri_handler()
285 buffer_append_string_buffer(p->tmp_buf, realm->value); in mod_auth_uri_handler()
286 buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("\"")); in mod_auth_uri_handler()
291 http_auth_digest_generate_nonce(srv, p, srv->tmp_buf, hh); in mod_auth_uri_handler()
293 buffer_copy_string_len(p->tmp_buf, CONST_STR_LEN("Digest realm=\"")); in mod_auth_uri_handler()
294 buffer_append_string_buffer(p->tmp_buf, realm->value); in mod_auth_uri_handler()
295 buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("\", nonce=\"")); in mod_auth_uri_handler()
296 buffer_append_string(p->tmp_buf, hh); in mod_auth_uri_handler()
[all …]
H A Dmod_cgi.c65 buffer *tmp_buf; member
112 p->tmp_buf = buffer_init(); in INIT_FUNC()
140 buffer_free(p->tmp_buf); in FREE_FUNC()
962 buffer_reset(p->tmp_buf); in cgi_create_env()
966 p->tmp_buf->used--; /* strip \0 after HTTP_ */ in cgi_create_env()
969 buffer_prepare_append(p->tmp_buf, ds->key->used + 2); in cgi_create_env()
980 p->tmp_buf->ptr[p->tmp_buf->used++] = cr; in cgi_create_env()
982 p->tmp_buf->ptr[p->tmp_buf->used++] = '\0'; in cgi_create_env()
996 buffer_reset(p->tmp_buf); in cgi_create_env()
1009 p->tmp_buf->ptr[p->tmp_buf->used++] = cr; in cgi_create_env()
[all …]
H A Dnetwork_write.c148 buffer_prepare_copy(srv->tmp_buf, toSend); in network_write_chunkqueue_write()
151 if (-1 == (toSend = read(ifd, srv->tmp_buf->ptr, toSend))) { in network_write_chunkqueue_write()
160 if ((r = send(fd, srv->tmp_buf->ptr, toSend, 0)) < 0) { in network_write_chunkqueue_write()
167 if ((r = write(fd, srv->tmp_buf->ptr, toSend)) < 0) { in network_write_chunkqueue_write()
H A Dmod_dirlisting.c73 buffer *tmp_buf; member
158 p->tmp_buf = buffer_init(); in INIT_FUNC()
189 buffer_free(p->tmp_buf); in FREE_FUNC()
542 buffer_copy_string_buffer(p->tmp_buf, con->physical.path); in http_list_directory_header()
543 BUFFER_APPEND_SLASH(p->tmp_buf); in http_list_directory_header()
544 buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("HEADER.txt")); in http_list_directory_header()
546 if (-1 != stream_open(&s, p->tmp_buf)) { in http_list_directory_header()
595 buffer_copy_string_buffer(p->tmp_buf, con->physical.path); in http_list_directory_footer()
596 BUFFER_APPEND_SLASH(p->tmp_buf); in http_list_directory_footer()
597 buffer_append_string_len(p->tmp_buf, CONST_STR_LEN("README.txt")); in http_list_directory_footer()
[all …]
H A Dresponse.c345 buffer_copy_string_buffer(srv->tmp_buf, con->uri.path_raw); in http_response_prepare()
346 buffer_urldecode_path(srv->tmp_buf); in http_response_prepare()
347 buffer_path_simplify(con->uri.path, srv->tmp_buf); in http_response_prepare()
646 buffer_copy_string_buffer(srv->tmp_buf, con->physical.path); in http_response_prepare()
650 buffer_copy_string_len(con->physical.path, srv->tmp_buf->ptr, slash - srv->tmp_buf->ptr); in http_response_prepare()
652 buffer_copy_string_buffer(con->physical.path, srv->tmp_buf); in http_response_prepare()
663 slash = strrchr(srv->tmp_buf->ptr, '/'); in http_response_prepare()
671 …} while ((found == 0) && (slash != NULL) && ((size_t)(slash - srv->tmp_buf->ptr) > (con->physical.… in http_response_prepare()
H A Dmod_alias.c176 buffer_copy_string_buffer(srv->tmp_buf, ds->value); in PHYSICALPATH_FUNC()
177 buffer_append_string(srv->tmp_buf, uri_ptr + alias_len); in PHYSICALPATH_FUNC()
178 buffer_copy_string_buffer(con->physical.path, srv->tmp_buf); in PHYSICALPATH_FUNC()
H A Dconfigfile.c1276 buffer_copy_string_buffer(srv->tmp_buf, srv->srvconf.changeroot); in config_set_defaults()
1277 buffer_append_string_buffer(srv->tmp_buf, s->document_root); in config_set_defaults()
1279 if (-1 == stat(srv->tmp_buf->ptr, &st1)) { in config_set_defaults()
1282 srv->tmp_buf); in config_set_defaults()
1288 buffer_copy_string_buffer(srv->tmp_buf, s->document_root); in config_set_defaults()
1290 buffer_to_lower(srv->tmp_buf); in config_set_defaults()
1295 if (0 == stat(srv->tmp_buf->ptr, &st1)) { in config_set_defaults()
1298 is_lower = buffer_is_equal(srv->tmp_buf, s->document_root); in config_set_defaults()
1301 buffer_copy_string_buffer(srv->tmp_buf, s->document_root); in config_set_defaults()
1303 buffer_to_upper(srv->tmp_buf); in config_set_defaults()
[all …]
H A Dnetwork_mtcp_writev.c468 buffer_prepare_copy(srv->tmp_buf, toSend); in network_write_chunkqueue_mtcp_writev()
471 if (-1 == (toSend = read(ifd, srv->tmp_buf->ptr, toSend))) { in network_write_chunkqueue_mtcp_writev()
480 if ((r = send(fd, srv->tmp_buf->ptr, toSend, 0)) < 0) { in network_write_chunkqueue_mtcp_writev()
487 if ((r = mtcp_write(srv->mctx, fd, srv->tmp_buf->ptr, toSend)) < 0) { in network_write_chunkqueue_mtcp_writev()
H A Dmod_fastcgi.c1760 buffer_reset(srv->tmp_buf); in fcgi_env_add_request_headers()
1764 srv->tmp_buf->used--; in fcgi_env_add_request_headers()
1767 buffer_prepare_append(srv->tmp_buf, ds->key->used + 2); in fcgi_env_add_request_headers()
1777 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in fcgi_env_add_request_headers()
1779 srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0'; in fcgi_env_add_request_headers()
1792 buffer_reset(srv->tmp_buf); in fcgi_env_add_request_headers()
1804 srv->tmp_buf->ptr[srv->tmp_buf->used++] = c; in fcgi_env_add_request_headers()
1806 srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0'; in fcgi_env_add_request_headers()
2281 buffer_urldecode_path(srv->tmp_buf); in fcgi_response_parse()
2286 srv->tmp_buf); in fcgi_response_parse()
[all …]
H A Dmod_webdav.c80 buffer *tmp_buf; member
95 p->tmp_buf = buffer_init(); in INIT_FUNC()
159 buffer_free(p->tmp_buf); in FREE_FUNC()
1865 buffer_copy_string_buffer(p->tmp_buf, p->uri.path_raw); in URIHANDLER_FUNC()
1866 buffer_urldecode_path(p->tmp_buf); in URIHANDLER_FUNC()
1867 buffer_path_simplify(p->uri.path, p->tmp_buf); in URIHANDLER_FUNC()
2324 buffer_append_string(p->tmp_buf, uuid); in URIHANDLER_FUNC()
2338 CONST_BUF_LEN(p->tmp_buf), in URIHANDLER_FUNC()
2404 CONST_BUF_LEN(p->tmp_buf), in URIHANDLER_FUNC()
2412 webdav_lockdiscovery(srv, con, p->tmp_buf, "exclusive", "write", 0); in URIHANDLER_FUNC()
[all …]
H A Dmod_scgi.c1408 buffer_reset(srv->tmp_buf); in scgi_env_add_request_headers()
1411 buffer_copy_string_len(srv->tmp_buf, CONST_STR_LEN("HTTP_")); in scgi_env_add_request_headers()
1412 srv->tmp_buf->used--; in scgi_env_add_request_headers()
1415 buffer_prepare_append(srv->tmp_buf, ds->key->used + 2); in scgi_env_add_request_headers()
1417 srv->tmp_buf->ptr[srv->tmp_buf->used++] = in scgi_env_add_request_headers()
1421 srv->tmp_buf->ptr[srv->tmp_buf->used++] = '\0'; in scgi_env_add_request_headers()
1423 scgi_env_add(p->scgi_env, CONST_BUF_LEN(srv->tmp_buf), CONST_BUF_LEN(ds->value)); in scgi_env_add_request_headers()
1434 buffer_reset(srv->tmp_buf); in scgi_env_add_request_headers()
1436 buffer_prepare_append(srv->tmp_buf, ds->key->used + 2); in scgi_env_add_request_headers()
1438 srv->tmp_buf->ptr[srv->tmp_buf->used++] = in scgi_env_add_request_headers()
[all …]
H A Dhttp_auth.h56 buffer *tmp_buf; member
H A Dmod_compress.c783 content_type = srv->tmp_buf; in PHYSICALPATH_FUNC()
870 buffer_copy_string_buffer(srv->tmp_buf, sce->etag); in PHYSICALPATH_FUNC()
871 buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("-")); in PHYSICALPATH_FUNC()
872 buffer_append_string(srv->tmp_buf, compression_name); in PHYSICALPATH_FUNC()
873 etag_mutate(con->physical.etag, srv->tmp_buf); in PHYSICALPATH_FUNC()
H A Dmod_magnet.c508 buffer_copy_string(srv->tmp_buf, get_http_method_name(con->request.http_method)); in magnet_env_get_buffer_by_id()
509 dest = srv->tmp_buf; in magnet_env_get_buffer_by_id()
516 buffer_copy_string(srv->tmp_buf, get_http_version_name(con->request.http_version)); in magnet_env_get_buffer_by_id()
517 dest = srv->tmp_buf; in magnet_env_get_buffer_by_id()
H A Dserver.c220 CLEAN(tmp_buf); in server_init()
308 CLEAN(tmp_buf); in server_free()
1705 buffer_copy_long(srv->tmp_buf, getpid()); in main()
1706 buffer_append_string_len(srv->tmp_buf, CONST_STR_LEN("\n")); in main()
1707 write(pid_fd, srv->tmp_buf->ptr, srv->tmp_buf->used - 1); in main()
H A Dconfigfile-glue.c439 buffer_copy_string(srv->tmp_buf, method); in config_check_cond_nocache()
441 l = srv->tmp_buf; in config_check_cond_nocache()
H A Dbase.h600 buffer *tmp_buf; member
H A Dconnections.c590 buffer_copy_off_t(srv->tmp_buf, qlen);
592 … response_header_overwrite(srv, con, CONST_STR_LEN("Content-Length"), CONST_BUF_LEN(srv->tmp_buf));