Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow all 2xx codes #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
ogonkov wants to merge 3 commits into mailru:master
base: master
Choose a base branch
Loading
from ogonkov:allow_all_2xx_sodes_as_success

Conversation

@ogonkov
Copy link

@ogonkov ogonkov commented Jun 13, 2017

All 2xx codes would be treated as the success one

Copy link
Author

ogonkov commented Jun 13, 2017

@RubaXa а что с тестовой картинкой?

Running "curl:jpg" (curl) task
Verifying property curl.jpg exists in config...OK
Files: [no src] -> tests/files/big.jpg
Warning: Fetching "https://dl.dropboxusercontent.com/u/49592745/BigJPG.jpg" failed with HTTP status code 404� Use --force to continue.
Aborted due to warnings.
npm ERR! Test failed. See above for more details.
The command "npm test" exited with 1.

Copy link
Contributor

RubaXa commented Jun 14, 2017

@ogonkov да, с картинкой какая-то лажа произошла, в субботу буду разбираться.

Copy link
Contributor

RubaXa commented Jun 19, 2017

@ogonkov готово, файл вернули, влейте актуальный мастер.

Copy link
Author

ogonkov commented Jun 21, 2017

Тесты не знаю куда воткнуть, открыл файл с тестами, испугался и закрыл

Copy link
Contributor

RubaXa commented Jun 21, 2017

А в чём проблема?

Нужно сделать подобное:

	test('upload file', function (){
		stop();
		FileAPI.upload({
			url: controllerUrl,
			files: { text: FileAPI.getFiles(uploadForm['hello.txt']) },
			data: {allowedStatus: 232},
			complete: function (err, res, xhr) {
				start();
				// тут проверяем статус xhr
			}
		});
	});

Тут нужна обработка allowedStatus
https://github.com/mailru/FileAPI/blob/master/node/server.js#L29-L47

Copy link
Author

ogonkov commented Jun 21, 2017

ok, завтра гляну подробнее

@ogonkov ogonkov marked this pull request as draft September 22, 2020 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /