@@ -526,13 +526,7 @@ def _get_index_file_redirect(self, request, project, version, filename, full_pat
526
526
527
527
return None
528
528
529
- def get_using_unresolver (self , request , path ):
530
- """
531
- 404 handler using the new proxito implementation.
532
-
533
- This is basically a copy of the get() method, but adapted to make use
534
- of the unresolver to extract the current project, version, and file.
535
- """
529
+ def get_using_unresolver (self , request , proxito_path ):
536
530
unresolved_domain = request .unresolved_domain
537
531
# We force all storage calls to use the external versions storage,
538
532
# since we are serving an external version.
@@ -546,7 +540,7 @@ def get_using_unresolver(self, request, path):
546
540
version = None
547
541
# If we weren't able to resolve a filename,
548
542
# then the path is the filename.
549
- filename = path
543
+ filename = proxito_path
550
544
lang_slug = None
551
545
version_slug = None
552
546
# Try to map the current path to a project/version/filename.
@@ -558,7 +552,7 @@ def get_using_unresolver(self, request, path):
558
552
try :
559
553
unresolved = unresolver .unresolve_path (
560
554
unresolved_domain = unresolved_domain ,
561
- path = path ,
555
+ path = proxito_path ,
562
556
append_indexhtml = False ,
563
557
)
564
558
project = unresolved .project
@@ -610,7 +604,7 @@ def get_using_unresolver(self, request, path):
610
604
project = project ,
611
605
version = version ,
612
606
filename = filename ,
613
- full_path = path ,
607
+ full_path = proxito_path ,
614
608
)
615
609
if response :
616
610
return response
@@ -624,12 +618,12 @@ def get_using_unresolver(self, request, path):
624
618
lang_slug = lang_slug ,
625
619
version_slug = version_slug ,
626
620
filename = filename ,
627
- full_path = path ,
621
+ full_path = proxito_path ,
628
622
)
629
623
if redirect_path and http_status :
630
624
try :
631
625
return self .get_redirect_response (
632
- request , redirect_path , path , http_status
626
+ request , redirect_path , proxito_path , http_status
633
627
)
634
628
except InfiniteRedirectException :
635
629
# ``get_redirect_response`` raises this when it's redirecting back to itself.
@@ -642,7 +636,7 @@ def get_using_unresolver(self, request, path):
642
636
project = project ,
643
637
version = version ,
644
638
path = filename ,
645
- full_path = path ,
639
+ full_path = proxito_path ,
646
640
)
647
641
648
642
response = self ._get_custom_404_page (
@@ -658,7 +652,7 @@ def get_using_unresolver(self, request, path):
658
652
# or other error handling is developed (version, language, filename).
659
653
raise contextualized_404_class (
660
654
project = project ,
661
- path_not_found = path ,
655
+ path_not_found = proxito_path ,
662
656
)
663
657
664
658
0 commit comments