Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Source code to troubleshoot 302 redirect issue

Avatar

Avatar
Springboard
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

107 posts

Correct Reply

2 solutions
Top badges earned
Springboard
Establish
Validate 10
Validate 1
Ignite 5
View profile

Avatar
Springboard
Level 3
jkpanera
Level 3

Likes

18 likes

Total Posts

107 posts

Correct Reply

2 solutions
Top badges earned
Springboard
Establish
Validate 10
Validate 1
Ignite 5
View profile
jkpanera
Level 3

11-06-2021

Hey guys,

 

I have a problem here where certain a request is returning a 302. It's a request to an asset that very much exists.

 

So

 

/content/dam/image.svg 302-> /content/dam/image.svg/

 

Which then gets a 403.

 

I would like to be able to debug this except that Adobe does not provide the source code for the filter chain, so it's just one big black box of broken pain that I can't navigate.

 

How do I get the source code?

 

I promise, sharing more source code won't hurt your sales. No one is going to try to cobble together an unsupported AEM from the source jars you guys hypothetically provide. You are only ruining the name of AEM in the dev community by not providing it.

 

BTW, this is 6.5 SP7

filter source code

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

110 likes

Total Posts

89 posts

Correct Reply

46 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile

Avatar
Boost 100
Employee
markus_bulla_adobe
Employee

Likes

110 likes

Total Posts

89 posts

Correct Reply

46 solutions
Top badges earned
Boost 100
Applaud 25
Affirm 25
Boost 50
Boost 25
View profile
markus_bulla_adobe
Employee

15-06-2021

Hi @jkpanera!

As already mentioned by some other members of this community, I would suggest to perform some root cause analysis on the issue that you are outlining. Some questions that should be answered before pointing to the AEM product source code would be:

  • What instance is causing the redirect? AEM author instance? AEM publish instance?
  • Could the redirect be caused by the webserver and/or dispatcher? Have you tried requesting the asset directly from the AEM instance, no dispatcher involved?
  • Is the issue reproducible a.) on other environments and/or b.) on a plain vanilla instance?
  • Have you tried deactivating some potential candidates that could cause the redirect to identify the actual root?
  • Have you checked resource resolution and mappings (in the OSGI web console) to see how the request is resolved?
  • You may also want to check the "Recent requests" view to get an insight into the applied filter chain as this is something that you specifically mention as something that you are looking for.

However, from my experience and without further knowledge about your setup or what you have already checked, I would most likely suspect this to be a dispatcher issue or somehow related to URL manipulation. You may want to check this article for potential candidates that could lead to the described behavior.

 

Once you have gained some more insights about the root cause, you may find a resolution somewhere in your specific setup (code, configuration, etc.). If you have indications that this might be a product issue, feel free to create a support ticket for our customer care team.

 

While I understand your desire to debug through closed-source AEM product code to a certain degree, this is usually not necessary (and often barely helpful) for this kind of analysis. You won't be able to patch anything for internal code. Even if you try or do so, you will loose support. For a proper analysis, there are plenty of tools available (within AEM and the stack as well as general Java analysis tools). From my personal experience, debugging through product internal source code is only helpful in rare edge cases.

 

If you still feel that AEM should be completely open-sourced, you may post this as a kind of feature request on this community (I'm not judging about chances of success here).

 

Hope that helps!

Answers (3)

Answers (3)

Avatar

Avatar
Boost 5
Level 6
Ritesh_M
Level 6

Likes

123 likes

Total Posts

99 posts

Correct Reply

37 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile

Avatar
Boost 5
Level 6
Ritesh_M
Level 6

Likes

123 likes

Total Posts

99 posts

Correct Reply

37 solutions
Top badges earned
Boost 5
Boost 3
Boost 1
Applaud 5
Affirm 1
View profile
Ritesh_M
Level 6

12-06-2021

 

Hi @jkpanera ,

 

If it is happening on webserver then must be because of rewrite module in apache and rules configured there (redirect rules). Just enable the rewrite logs in apache to debug.

Avatar

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile

Avatar
Give Back 100
Level 10
asutosh_jena
Level 10

Likes

570 likes

Total Posts

687 posts

Correct Reply

197 solutions
Top badges earned
Give Back 100
Boost 500
Affirm 100
Ignite 1
Establish
View profile
asutosh_jena
Level 10

12-06-2021

Hi @jkpanera @jkpanera 

If you are able to reproduce the issue on publish instance, then it will be an issue with sling:internalRedirect. Do you have any etc/maps rules configured on your instance?

Please remove all your etc/maps config from publish and check if it's reproducible on publish instance.

Else the other location is JCRResourceResolverFactory config where the mapping can be present.

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

620 likes

Total Posts

595 posts

Correct Reply

234 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

620 likes

Total Posts

595 posts

Correct Reply

234 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

11-06-2021

@jkpanera,

From the 302 redirect, it looks like an issue with your apache web server dispatcher configuration. Did allow .svg files from being reached?