jira-importer opened a new issue, #1138:
URL: https://github.com/apache/httpcomponents-core/issues/1138

   **[Torsten 
Rendelmann](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=torstenr)**
 opened 
**[HTTPCORE-627](https://issues.apache.org/jira/browse/HTTPCORE-627?redirect=false)**
 and commented
   
   We use the URIBuilder in our Vaadin projects to build URIs that are used at 
client site (Browser).
   
   For that we built a URI using URIBuilder with the special scheme "mailto:";, 
the e-Mail address of the receiver and some URL query parameters to suggest the 
mail subject and body content.
   
   The final URL should look like that:
   
   ```java
   mailto:[email protected]?subject=mail%20subject&body=mail%20body
   ```
   
   We were not able to create that using the URIBuilder. Here is our approach 
as a unit test:
   
   ```java
   @Test
   public void checkURIBuilderMailtoURLs() throws Exception {
      final URIBuilder uribuilder = new 
URIBuilder("mailto:[email protected]";).setParameter("subject", "mail subject");
      final String result = uribuilder.build().toString();
      Assert.assertTrue("mail address as scheme specific part expected", 
result.contains("[email protected]"));
      Assert.assertTrue("correct parameter encoding expected for that scheme", 
result.contains("mail%20subject"));
   }
   ```
   
    
   
   
   ---
   
   **Affects:** 5.0
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to