-
Notifications
You must be signed in to change notification settings - Fork 277
WAR load support #608
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
Closed
Closed
WAR load support #608
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
80ea46a
Add war file regression test
0de3132
Change to goto-cc/compile.cpp
5857165
Remove WAR class prefix
3784c17
Add .war suffix to language options
dab7c10
Add .war suffix to class_loader
c62e682
Add wiki link as documentation for WAR format
7489e88
Support empty jar/war JSON array
40b647f
Restructure java_bytecode_language
4f42f7f
Update WAR file regression test
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
CORE | ||
sample.war | ||
--function mypackage.Hello.doGet --cover location | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
\*\* 25 of 26 covered | ||
-- | ||
-- | ||
war file source https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://tomcat.apache.org/tomcat-6.0-doc/appdev/sample/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ Author: Daniel Kroening, [email protected] | |
|
||
#include <json/json_parser.h> | ||
#include <util/suffix.h> | ||
#include <util/suffix.h> | ||
#include <util/invariant.h> | ||
|
||
void jar_filet::open( | ||
|
@@ -53,6 +54,12 @@ void jar_filet::open( | |
#endif | ||
INVARIANT(file_name.size()==filename_len-1, "no \\0 found in file name"); | ||
|
||
// remove WAR class prefix | ||
// cf. https://en.wikipedia.org/wiki/WAR_(file_format) | ||
const std::string war_class_prefix("WEB-INF/classes/"); | ||
if(has_prefix(file_name, war_class_prefix)) | ||
file_name=file_name.substr(war_class_prefix.length()); | ||
|
||
// non-class files are loaded in any case | ||
bool add_file=!has_suffix(file_name, ".class"); | ||
// load .class file only if they match regex / are in match set | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I very much appreciate that comment - but you might even place it in the test.desc file (so as not to create a non-standard file): you can place comments after another
--
, seetest.pl --help