Projet

Général

Profil

0001-wscall-increase-transmission-timeout-according-to-po.patch

Frédéric Péters, 04 novembre 2015 15:38

Télécharger (1,22 ko)

Voir les différences:

Subject: [PATCH] wscall: increase transmission timeout according to post size
 (#8865)

 wcs/wf/wscall.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
wcs/wf/wscall.py
158 158

  
159 159
        try:
160 160
            if post_data is not None:
161
                timeout = TIMEOUT
161 162
                post_data = json.dumps(post_data, cls=JSONEncoder,
162 163
                        encoding=get_publisher().site_charset)
164
                timeout += len(post_data) / 100000 # increase timeout for huge loads
163 165
                response, status, data, authheader = http_post_request(
164
                        url, post_data, headers=headers, timeout=TIMEOUT)
166
                        url, post_data, headers=headers, timeout=timeout)
165 167
            else:
166 168
                response, status, data, auth_header = http_get_page(
167 169
                        url, headers=headers, timeout=TIMEOUT)
168
-