Skip to content
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

Encoding of special chars in confluence page title #180

Closed
qwazer opened this issue Oct 30, 2018 · 4 comments
Closed

Encoding of special chars in confluence page title #180

qwazer opened this issue Oct 30, 2018 · 4 comments
Assignees
Milestone

Comments

@qwazer
Copy link
Contributor

qwazer commented Oct 30, 2018

6.0-rc3

I have next site description in xml

<?xml version="1.0" encoding="UTF-8"?>
<bsc:site
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:bsc='https://github.com/bsorrentino/maven-confluence-plugin'
        xsi:schemaLocation='https://github.com/bsorrentino/maven-confluence-plugin https://raw.githubusercontent.com/bsorrentino/maven-confluence-plugin/master/schemas/site-schema-6.0.xsd'>

    <home name="[Prism]"
    uri="./markdown/prism.md" ignore-variables="true">
    </home>

</bsc:site>

When using REST API plugin responds with error:

Caused by: org.bsc.confluence.rest.AbstractRESTConfluenceService$ServiceException: error: find pages
Response{protocol=http/1.1, code=400, message= , url=https://confluence.[delete corporate domain]./rest/api/content?spaceKey=~areshetnikov&title=[Prism]&expand=space,version,container}
<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">h1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} h2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} h3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} body {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} b {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} p {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;} a {color:black;} a.name {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1><hr class="line" /><p><b>Type</b> Exception Report</p><p><b>Message</b> Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986</p><p><b>Description</b> The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).</p><p><b>Exception</b></p><pre>java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986

When using XML-RPC I'm able to publish without errors.

Possibly title should be encoded in URL or passed as POST parameter

@qwazer
Copy link
Contributor Author

qwazer commented Oct 30, 2018

Refers to square/okhttp#3235

@qwazer
Copy link
Contributor Author

qwazer commented Oct 30, 2018

See my PR #181

@qwazer
Copy link
Contributor Author

qwazer commented Nov 21, 2018

@bsorrentino Could you please release version 6.0-rc4 with this fix?

@bsorrentino bsorrentino self-assigned this Nov 25, 2018
@bsorrentino bsorrentino added this to the 6.0 milestone Nov 25, 2018
@bsorrentino
Copy link
Owner

version 6.0-rc4 has been released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants