This paper describes a study of the photoresponse of long-wavelength (LWIR) and mid-infrared (MWIR) p-type GaAs/AlGaAs quantum well infrared photodetectors (QWIPs) as a function of temperature and QWIP parameters. Using an 8x8 envelope-function model (EFA), we designed and calculated the optical absorption of several bound-to-continuum (BC) structures, with the optimum designs corresponding to the second light hole level (LH2) coincident with the top of the well. For the temperature-dependent study, one non-optimized LWIR and one optimized MWIR samples were grown by MBE and their photoresponse and absorption characteristics measured to test the theory. The theory shows that the placement of the LH2 resonance at the top of the well for the optimized sample and the presence of light-hole-like quasi-bound states within the heavy-hole continuum for the nonoptimized sample account for their markedly different thermal and polarization characteristics. In particular, the theory predicts that, for the LWIR sample, the LH-like quasi-bound states should lead to an increased Ppolarized photoresponse as a function of temperature. Our temperature dependent photoresponse measurements corroborate most of the theoretical findings with respect to the long-wavelength threshold, shape, and polarization and temperature dependence of the spectra.