![]() ![]() items () 86 for name, value in headers : 87 if name. 80 81 :param response: swob.Response object 82 :param headers: dictionary headers 83 """ 84 if hasattr (headers, 'items' ): 85 headers = headers. storage_policy import POLICIES 69 70 71 DEFAULT_RECHECK_ACCOUNT_EXISTENCE = 60 # seconds 72 DEFAULT_RECHECK_CONTAINER_EXISTENCE = 60 # seconds 73 DEFAULT_RECHECK_UPDATING_SHARD_RANGES = 3600 # seconds 74 DEFAULT_RECHECK_LISTING_SHARD_RANGES = 600 # seconds 75 76 77 def update_headers (response, headers ): 78 """ 79 Helper function to update headers in the response. request_helpers import strip_sys_meta_prefix, \ 64 strip_user_meta_prefix, is_user_meta, is_sys_meta, is_sys_or_user_meta, \ 65 http_response_to_document_iters, is_object_transient_sysmeta, \ 66 strip_object_transient_sysmeta_prefix, get_ip_port, get_user_meta_prefix, \ 67 get_sys_meta_prefix 68 from swift. swob import Request, Response, Range, \ 60 HTTPException, HTTPRequestedRangeNotSatisfiable, HTTPServiceUnavailable, \ 61 status_map, wsgi_to_str, str_to_wsgi, wsgi_quote, wsgi_unquote, \ 62 normalize_etag 63 from swift. http import is_informational, is_success, is_redirection, \ 56 is_server_error, HTTP_OK, HTTP_PARTIAL_CONTENT, HTTP_MULTIPLE_CHOICES, \ 57 HTTP_BAD_REQUEST, HTTP_NOT_FOUND, HTTP_SERVICE_UNAVAILABLE, \ 58 HTTP_INSUFFICIENT_STORAGE, HTTP_UNAUTHORIZED, HTTP_CONTINUE, HTTP_GONE 59 from swift. header_key_dict import HeaderKeyDict 55 from swift. exceptions import ChunkReadTimeout, ChunkWriteTimeout, \ 53 ConnectionTimeout, RangeAlread圜omplete, ShortReadError 54 from swift. bufferedhttp import http_connect 51 from swift. utils import Timestamp, WatchdogTimeout, config_true_value, \ 46 public, split_path, list_from_csv, GreenthreadSafeIterator, \ 47 GreenAsyncPile, quorum_size, parse_content_type, drain_and_close, \ 48 document_iters_to_http_response_body, ShardRange, find_shard_range, \ 49 cache_from_env 50 from swift. wsgi import make_pre_authed_env, make_pre_authed_request 45 from swift. timeout import Timeout 42 import six 43 44 from swift. parse import quote 28 29 import os 30 import time 31 import json 32 import functools 33 import inspect 34 import itertools 35 import operator 36 from copy import deepcopy 37 from sys import exc_info 38 from swift import gettext_ as _ 39 40 from eventlet import sleep 41 from eventlet. We've seen objects hang around forever otherwise. 24 # These shenanigans are to ensure all related objects can be garbage 25 # collected. close() and then reads 23 # commence to empty out any buffers. ![]() To prevent having to read all the data 22 # that could be left, the source connection can be. 19 # It is used when early termination of reading from the connection should 20 # happen, such as when a range request is satisfied but there's still more the 21 # source connection would like to send. This is the 18 # source bufferedhttp connection of whatever it is attached to. 15 16 # NOTE: swift_conn 17 # You'll see swift_conn passed around a few places in this file. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 5 # You may obtain a copy of the License at 6 # 7 # 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 12 # implied. I'm running XCode 7 Beta.As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers.Īlternatively you can here view or download the uninterpreted source code file.įor more information about "base.py" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 2.29.1_vs_2.30.0.ġ # Copyright (c) 2010-2016 OpenStack Foundation 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License") 4 # you may not use this file except in compliance with the License. I'm attempting to check for network connectivity in my Swift app, and timeout after a certain number of seconds.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |