Skip to content

Allow all 2xx codes - #400

Draft
ogonkov wants to merge 3 commits into
mailru:masterfrom
ogonkov:allow_all_2xx_sodes_as_success
Draft

Allow all 2xx codes#400
ogonkov wants to merge 3 commits into
mailru:masterfrom
ogonkov:allow_all_2xx_sodes_as_success

Conversation

@ogonkov

Copy link
Copy Markdown

All 2xx codes would be treated as the success one

@ogonkov

Copy link
Copy Markdown
Author

@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.

@RubaXa

Copy link
Copy Markdown
Contributor

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

@RubaXa

Copy link
Copy Markdown
Contributor

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

@ogonkov

Copy link
Copy Markdown
Author

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

@RubaXa

Copy link
Copy Markdown
Contributor

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

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

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

@ogonkov

Copy link
Copy Markdown
Author

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ogonkov@RubaXa