Let
\[
I = \int_0^{\pi/2} \frac{dx}{1 + \sqrt{\tan x}}.
\]
Make the substitution \( x = \frac{\pi}{2} - t \), so \( dx = -dt \).
Note that
\[
\tan\left( \frac{\pi}{2} - t \right) = \cot t = \frac{1}{\tan t}.
\]
Thus,
\[
I = \int_{\pi/2}^0 \frac{-dt}{1 + \sqrt{\cot t}} = \int_0^{\pi/2} \frac{dt}{1 + \frac{1}{\sqrt{\tan t}}} = \int_0^{\pi/2} \frac{dt}{1 + \frac{1}{\sqrt{\tan t}}}.
\]
Simplify the denominator:
\[
1 + \frac{1}{\sqrt{\tan t}} = \frac{\sqrt{\tan t} + 1}{\sqrt{\tan t}}.
\]
So the integrand becomes
\[
\frac{1}{\frac{\sqrt{\tan t} + 1}{\sqrt{\tan t}}} = \frac{\sqrt{\tan t}}{\sqrt{\tan t} + 1}.
\]
Therefore,
\[
I = \int_0^{\pi/2} \frac{\sqrt{\tan t}}{\sqrt{\tan t} + 1} dt.
\]
Add the two expressions for \( I \):
\[
2I = \int_0^{\pi/2} \left( \frac{1}{1 + \sqrt{\tan x}} + \frac{\sqrt{\tan x}}{1 + \sqrt{\tan x}} \right) dx = \int_0^{\pi/2} 1 \, dx = \frac{\pi}{2}.
\]
Hence,
\[
I = \frac{\pi}{4}.
\]
Final answer:
\[
\boxed{
\frac{\pi}{4}.
}
\]