Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

Unable to read big json file from Request.Body #3235

Closed
@anfomin

Description

@anfomin

I'm trying to read big JSON file (UTF8) from Request.Body stream:

string content;
using (var sr = new StreamReader(Request.Body, Encoding.Default))
    content = sr.ReadToEnd();

At the beginning it's ok, but content variable contains invalid character sequence after some offset.

Sample repo: https://github.com/anfomin/DNX-MVC-bigfile. There is file sample.json. Just run dnx kestrel and make:

POST http://localhost:5000

with body = sample.json file.

You will find mismatches since line 84.

Source:
2015-09-30 19 58 00

Result:
2015-09-30 19 58 18

I've tried latest DNX 1.0.0-beta8-15736 from https://www.myget.org/F/aspnetvnext/api/v2 and 1.0.0-rc1-15775 from https://www.myget.org/F/aspnetcidev/api/v2.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions