|
|
@ -9,20 +9,21 @@ |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
:license: BSD, see LICENSE for more details. |
|
|
|
""" |
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
import pytest |
|
|
|
import pickle |
|
|
|
|
|
|
|
|
|
|
|
import re |
|
|
|
import re |
|
|
|
import uuid |
|
|
|
|
|
|
|
import time |
|
|
|
import time |
|
|
|
import flask |
|
|
|
import uuid |
|
|
|
import pickle |
|
|
|
|
|
|
|
from datetime import datetime |
|
|
|
from datetime import datetime |
|
|
|
from threading import Thread |
|
|
|
from threading import Thread |
|
|
|
from flask._compat import text_type |
|
|
|
|
|
|
|
from werkzeug.exceptions import BadRequest, NotFound, Forbidden |
|
|
|
import pytest |
|
|
|
|
|
|
|
import werkzeug.serving |
|
|
|
|
|
|
|
from werkzeug.exceptions import BadRequest, Forbidden, NotFound |
|
|
|
from werkzeug.http import parse_date |
|
|
|
from werkzeug.http import parse_date |
|
|
|
from werkzeug.routing import BuildError |
|
|
|
from werkzeug.routing import BuildError |
|
|
|
import werkzeug.serving |
|
|
|
|
|
|
|
|
|
|
|
import flask |
|
|
|
|
|
|
|
from flask._compat import text_type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_options_work(app, client): |
|
|
|
def test_options_work(app, client): |
|
|
@ -523,14 +524,14 @@ def test_session_vary_cookie(app, client): |
|
|
|
@app.route('/vary-cookie-header-set') |
|
|
|
@app.route('/vary-cookie-header-set') |
|
|
|
def vary_cookie_header_set(): |
|
|
|
def vary_cookie_header_set(): |
|
|
|
response = flask.Response() |
|
|
|
response = flask.Response() |
|
|
|
response.headers['Vary'] = 'Cookie' |
|
|
|
response.vary.add('Cookie') |
|
|
|
flask.session['test'] = 'test' |
|
|
|
flask.session['test'] = 'test' |
|
|
|
return response |
|
|
|
return response |
|
|
|
|
|
|
|
|
|
|
|
@app.route('/vary-header-set') |
|
|
|
@app.route('/vary-header-set') |
|
|
|
def vary_header_set(): |
|
|
|
def vary_header_set(): |
|
|
|
response = flask.Response() |
|
|
|
response = flask.Response() |
|
|
|
response.headers['Vary'] = 'Accept-Encoding, Accept-Language' |
|
|
|
response.vary.update(('Accept-Encoding', 'Accept-Language')) |
|
|
|
flask.session['test'] = 'test' |
|
|
|
flask.session['test'] = 'test' |
|
|
|
return response |
|
|
|
return response |
|
|
|
|
|
|
|
|
|
|
|