<commit_before><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
<urlrewrite use-context="true">

    <!-- WEBAPP CONTEXT BLOCKER RULE - ignore all outbound links that do not target our webapp -->
    <outbound-rule>
        <from>^(.*)$</from>
        <set name="urlFilter.outUrlWebapp.outUrl">$1</set>
        <run class="com.ilscipio.scipio.ce.webapp.filter.UrlFilterHelper" method="verifySameWebappContext" />
    </outbound-rule>
    <outbound-rule>
        <condition type="attribute" name="urlFilter.outUrlWebapp.isSameContext" operator="equal">false</condition>
          <from>.*</from>
        <to last="true">-</to>
    </outbound-rule>

    <!-- CACHE -->
    <!-- Set the "Cache-Control" HTTP response header for all requests
    <rule>
        <from>.*</from>
        <set type="response-header" name="Cache-Control">max-age=3600, must-revalidate</set>
    </rule>
    -->

    <!-- LEGACY ECOMMERCE REDIRECT -->
    <rule>
        <from>^/ecommerce([?;#/].*)?$</from>
        <to type="permanent-redirect" last="true">$1/shop$2</to>
    </rule>

    <!-- SPECIAL REQUEST ATTRIBUTES FOR REWRITE RULES (scpCtrlServPath, etc.) -->
    <rule>
        <from>^.*$</from>
        <run class="com.ilscipio.scipio.ce.webapp.filter.UrlFilterHelper" method="setCommonReqAttr" />
    </rule>

    <!-- DEFAULT REQUEST MAPPING RULE - maps default request ("/") to main
        uncomment this to get rid of /control/main URLs -->
    <rule>
        <from>^/[^/]+/?([?;#][^/]*)?$</from>
        <to last="true">%{attribute:scpCtrlServPath}/main$3</to>
    </rule>
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?(/control)?/main([?;#].*)?$</from>
        <to last="true">$1$2/$4</to>
    </outbound-rule>
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?(/control)?/main(/.*)$</from>
        <to last="true">$1$2$4</to>
    </outbound-rule>

    <!-- CONTROL-SERVLET-STRIPPING RULES 
        These can be used instead of mapping ControlServlet to root; if you uncomment these,
        you likely want to set forwardRootControllerUris to Y in ContextFilter init-params in web.xml.
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?/control([?;#/].*)?$</from>
        <to>$1$2$3</to>
    </outbound-rule>
    -->
     
</urlrewrite>

<commit_msg>NoRef shop: urlrewrite.xml: bad formatting<commit_after><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
<urlrewrite use-context="true">

    <!-- WEBAPP CONTEXT BLOCKER RULE - ignore all outbound links that do not target our webapp -->
    <outbound-rule>
        <from>^(.*)$</from>
        <set name="urlFilter.outUrlWebapp.outUrl">$1</set>
        <run class="com.ilscipio.scipio.ce.webapp.filter.UrlFilterHelper" method="verifySameWebappContext" />
    </outbound-rule>
    <outbound-rule>
        <condition type="attribute" name="urlFilter.outUrlWebapp.isSameContext" operator="equal">false</condition>
        <from>.*</from>
        <to last="true">-</to>
    </outbound-rule>

    <!-- CACHE -->
    <!-- Set the "Cache-Control" HTTP response header for all requests
    <rule>
        <from>.*</from>
        <set type="response-header" name="Cache-Control">max-age=3600, must-revalidate</set>
    </rule>
    -->

    <!-- LEGACY ECOMMERCE REDIRECT -->
    <rule>
        <from>^/ecommerce([?;#/].*)?$</from>
        <to type="permanent-redirect" last="true">$1/shop$2</to>
    </rule>

    <!-- SPECIAL REQUEST ATTRIBUTES FOR REWRITE RULES (scpCtrlServPath, etc.) -->
    <rule>
        <from>^.*$</from>
        <run class="com.ilscipio.scipio.ce.webapp.filter.UrlFilterHelper" method="setCommonReqAttr" />
    </rule>

    <!-- DEFAULT REQUEST MAPPING RULE - maps default request ("/") to main
        uncomment this to get rid of /control/main URLs -->
    <rule>
        <from>^/[^/]+/?([?;#][^/]*)?$</from>
        <to last="true">%{attribute:scpCtrlServPath}/main$3</to>
    </rule>
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?(/control)?/main([?;#].*)?$</from>
        <to last="true">$1$2/$4</to>
    </outbound-rule>
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?(/control)?/main(/.*)$</from>
        <to last="true">$1$2$4</to>
    </outbound-rule>

    <!-- CONTROL-SERVLET-STRIPPING RULES 
        These can be used instead of mapping ControlServlet to root; if you uncomment these,
        you likely want to set forwardRootControllerUris to Y in ContextFilter init-params in web.xml.
    <outbound-rule>
        <from>^([^/]*//[^/]*)?(/[^/]*?)?/control([?;#/].*)?$</from>
        <to>$1$2$3</to>
    </outbound-rule>
    -->
     
</urlrewrite>


{'fraction_non_alphanumeric': 0.2223840232993551, 'fraction_numerical': 0.00998543790305804, 'mean_word_length': 2.6984615384615385, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 2, '>': 137, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '410596', 'n_tokens_mistral': 1801, 'n_tokens_neox': 1712, 'n_words': 302}