Issues
Elasticsearch request - JsonParseException[Invalid UTF-8 middle byte 0xf6\n
Description
Environment
Windows 10, Elasticsearch 1.7.2
Attachments
relates to
Details
Assignee
Michael OffnerMichael OffnerReporter
Harry KleinHarry KleinPriority
NewFix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Details
Details
Assignee
Reporter
Priority
Fix versions
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Affects versions
Activity
Harry Klein18 July 2016 at 15:51
This would work!
Von: Michael Offner (JIRA) jira@luceeserver.atlassian.net
Gesendet: Montag, 18. Juli 2016 14:50
An: Harry Klein <Klein@contens.de>
Betreff: [JIRA] (LDEV-931) Elasticsearch request - JsonParseException[Invalid UTF-8 middle byte 0xf6\n
[cid:jira-generated-image-avatar-85c43313-ac46-4324-b767-5e667471ebe8]
Michael Offner<https://luceeserver.atlassian.net/secure/ViewProfile.jspa?name=michaeloffner> commented on [Bug] LDEV-931<https://luceeserver.atlassian.net/browse/LDEV-931>
Re: Elasticsearch request - JsonParseException[Invalid UTF-8 middle byte 0xf6\n<https://luceeserver.atlassian.net/browse/LDEV-931>
what happens if you do:
<cfhttpparam type="body" mimetype="text/plain; charset=UTF-8" value="#sPayload#" />
[Add Comment]<https://luceeserver.atlassian.net/browse/LDEV-931#add-comment>
Add Comment<https://luceeserver.atlassian.net/browse/LDEV-931#add-comment>
This message was sent by Atlassian JIRA (v1000.148.3#100005-sha1:53b5f3f)
[Atlassian logo]
Michael Offner18 July 2016 at 15:36
Michael Offner18 July 2016 at 12:49
what happens if you do:
<cfhttpparam type="body" mimetype="text/plain; charset=UTF-8" value="#sPayload#" />
Please install Elasticsearch 1.7.2 first.
Change the IP adress in the testcase.
You should get a "Bad request" error:
{"error":"ElasticsearchParseException[failed to parse source for create index]; nested: JsonParseException[Invalid UTF-8 middle byte 0xf6\n at [Source: [B@5a31f88b; line: 1, column: 12]]; ","status":400}
Wokarounds:
Save the testfile as UTF-8 file (whitout BOM)
Uncomment the line
<cfset sPayload = createObject("java", "org.apache.http.entity.StringEntity").init(sPayload, "utf-8")>