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
[MSITE-872] Set the Content-Type header #48
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs tests
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests are required
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
Tests are needed : I need to first start the jetty server (mvn site:run) then make a simple GET http call, then stop the jetty server. Is there a similar Integration Test in the project ? |
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
I think this could be tested as a unit test that invokes the method directly and confirms the response. |
See https://issues.apache.org/jira/browse/MSITE-872 Set the ContentType to the Response
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
src/main/java/org/apache/maven/plugins/site/run/DoxiaFilter.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/site/run/SiteRunMSITE872Test.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/site/run/SiteRunMSITE872Test.java
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/site/run/SiteRunMSITE872Test.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/maven/plugins/site/run/SiteRunMSITE872Test.java
Outdated
Show resolved
Hide resolved
Clean code
Two possible results according to the OS / version
3 possible mimetypes pour javascript
Tested ok in standalone mode and ok in the CI chain |
The test looks convoluted to me. Why not fire up Jetty, and get the |
Could someone help me in creating such a test, is there an example ? Thanks |
This PR isn't good. I have a decent one locally. Will commit soon. |
Set the header Content-Type according to the file extension
See https://issues.apache.org/jira/browse/MSITE-872